Skip to content

Commit 1699aee

Browse files
authored
make changes based on @crichID's ✨ notes
1 parent 6ecec7d commit 1699aee

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

book/17_tags_and_releases.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,29 @@ You may want to put tags or releases on certain commits in your code's history t
44

55
### Tags
66

7-
A tag is a pointer that points to a specific commit. Unlike commits, tags are _not_ immutable. They can be moved and changed. Before we get into Releases, let's practice a bit with tags.
7+
A tag is a pointer that points to a specific commit. Unlike commits, tags are _not_ immutable. They can be moved and changed. Let's practice a bit with tags.
88

9-
When creating a tag from the command line, you can make a "lightweight" or an "annotated" tag. The following example creates an annotated tag with the `-a` flag, names the tag `v1.0`, and connects it to whichever commit SHA is included.
9+
When creating a tag from the command line, it's recommended to create an "annotated" tag. The following example creates an annotated tag with the `-a` flag, names the tag `v1.0`, and connects it to whichever commit SHA is included.
1010

1111
- `git tag -a v1.0 <SHA>`
1212

1313
To see all tags, type `git tag --list`.
1414

15-
Another caveat with tags is that they are not automatically pushed up with commits. To push tags, type `git push <remote> --tags`.
15+
Another caveat with tags is that they are not automatically pushed up with commits. To push tags, type `git push --tags`.
16+
17+
You can also set this as a default with configs using `git config push.followTags true` which will automatically push tags when their associated commits will be pushed. [Read more about tags here](https://git-scm.com/docs/git-config/2.4.1#git-config-pushfollowTags).
1618

1719
### Releases
1820

19-
Releases are similar to tags, because they point to a specific commit and can be named like any other tag. However, releases can also include attached binaries. This means you can upload and store the compiled program for others to download, and have that compiled version be attached to the exact source code that composes it. We recommend using GitHub Releases in place of tags; a tag will still be created, but it will have a GitHub linked history that cannot be changed.
21+
Releases are similar to tags, because they point to a specific commit and can be named like any other tag. However, releases can also include attached binaries. This means you can upload and store the compiled program for others to download, and have that compiled version be attached to the exact source code that composes it. Tags can be created locally with Git, or on GitHub. However, releases are a GitHub feature that allow you to add an executable to the tag for easier access by visitors who just want to download and install your software.
2022

2123
### Add a Release to GitHub-Games
2224

2325
1. On GitHub, navigate to the main page of the repository.
2426
1. Under your repository name, click Releases.
2527
1. Click Draft a new release.
26-
1. Type a version number for your release. Versions are based on Git tags. We recommend naming tags that fit within semantic versioning.
27-
1. Select a branch that contains the project you want to release. Usually, you'll want to release against your master branch, unless you're releasing beta software.
28+
1. Type a name for the tag. We recommend you use semantic versioning.
29+
1. Select a branch that contains the project you want to release. Usually, you'll want to release against your master branch, unless you're releasing beta software. You can also select a recent commit by clicking the drop down and choosing recent commits.
2830
1. Type a title and description that describes your release.
2931
1. If you're ready to publicize your release, click Publish release. Otherwise, click Save draft to work on it later.
3032

0 commit comments

Comments
 (0)