From bf0bc5b32d67c4fab03108dd6ffc44aa47884210 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Sun, 10 Dec 2017 23:45:58 -0500 Subject: [PATCH] Change -a to -s and add more tag commands to git.md --- help/git.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/help/git.md b/help/git.md index e8f98414..cc20d66e 100644 --- a/help/git.md +++ b/help/git.md @@ -90,15 +90,18 @@ Note that you should always make changes from an external branch then make a pul ### Working with Tags - Show all the tags in a repository: `git tag` -- Create a new tag: `git tag -a -m ` +- Create a new tag: `git tag -s -m ` - If `-m` is not given, git will open your editor to allow you to type a more detailed message - The tag name is usually a version number such as `v2.4.3` + - Note that if for some reason you don't want to sign your tag, you should use `-a` instead. - View the saved data of a tag: `git show ` -- Tag a specific commit instead of the current state in the repository: `git tag -a ` -- Push a tag to the remote repository: `git push origin ` +- Tag a specific commit instead of the current state in the repository: `git tag -s ` +- Push a tag to the remote repository: `git push origin ` - Note that sharing a tag is the same as sharing remote branches - Push all tags to upstream: `git push --tags` - Easily change between versions of a repository (through tags): `git checkout ` - Update a previous version with new changes: `git checkout -b ` - Note that you should make a new tag for the updated commit since `` already refers to a commit and is not changed - For example, if you checkout tag `2.0` then the new tag can be, for example, `2.0.1` or `2.0a` +- List all the tags in a given repository: `git tag -l` +- Delete a tag (should rarely be used, if ever): `git tag -d `