git-tag is the Git command used to create, list, delete or verify a tag object signed with GPG. A tag is used to mark specific points in history as being important.
Questions tagged [git-tag]
543 questions
496
votes
7 answers
How to clone a specific Git tag
From git-clone(1) Manual Page
--branch can also take tags and detaches the HEAD at that commit in the resulting repository.
I tried
git clone --branch
But it does not work. It returns:
warning: Remote branch 2.13.0 not…

Jiang Jun
- 5,245
- 3
- 16
- 13
482
votes
10 answers
How to list all tags along with the full message in git?
I want git to list all tags along with the full annotation or commit message. Something like this is close:
git tag -n5
This does exactly what I want except that it will only show up to the first 5 lines of the tag message.
I guess I can just use a…

still_dreaming_1
- 8,661
- 6
- 39
- 56
474
votes
6 answers
Depend on a branch or tag using a git URL in a package.json?
Say I've forked a node module with a bugfix and I want to use my fixed version, on a feature branch of course, until the bugfix is merged and released.
How would I reference my fixed version in the dependencies of my package.json?

hurrymaplelad
- 26,645
- 10
- 56
- 76
393
votes
8 answers
Why should I care about lightweight vs. annotated tags?
I switched from Subversion to Git as my day-to-day VCS last year and am still trying to grasp the finer points of "Git-think".
The one which has been bothering me lately is "lightweight" vs. annotated vs. signed tags. It seems pretty universally…

Ben Blank
- 54,908
- 28
- 127
- 156
353
votes
19 answers
Delete all tags from a Git repository
I want to delete all the tags from a Git repository. How can I do that?
Using git tag -d tagname delete the tag tagname locally, and using git push --tags I update the tags on the git provider.
I tried:
git tag -d *
But I see that * means the files…

Ionică Bizău
- 109,027
- 88
- 289
- 474
302
votes
6 answers
Does "git fetch --tags" include "git fetch"?
A nice and simple question - is the function of "git fetch" a strict sub-set of git fetch --tags?
I.e. if I run git fetch --tags, is there ever a reason to immediately run git fetch straight afterward?
What about git pull and git pull --tags? Same…

davidA
- 12,528
- 9
- 64
- 96
301
votes
2 answers
How to list all tags that contain a commit?
This question is similar to How to list all tags pointing to a specific commit in git, but with one difference: I wish to search for all tags that contain a specific commit within the tree of each tag, not specifically the files marked in the tag…

atx
- 4,831
- 3
- 26
- 40
297
votes
8 answers
Is there a standard naming convention for git tags?
I've seen a lot of projects using v1.2.3 as the naming convention for tags in git. I've also seen some use 1.2.3. Is there an officially endorsed style, or are there any good arguments for using either?

troelskn
- 115,121
- 27
- 131
- 155
286
votes
7 answers
Show which git tag you are on?
I'm having trouble finding out which tag is currently checked out.
When I do:
git checkout tag1
git branch
I can't seem to find out which tag I'm on. It only logs:
* (no branch)
master
Is it possible to find out which tags are checked out? In…

grm
- 5,197
- 5
- 29
- 35
285
votes
11 answers
How do I edit an existing tag message in Git?
We have several annotated tags in our Git repository. The older tags have bogus messages that we would like to update to be in our new style.
% git tag -n1
v1.0 message
v1.1 message
v1.2 message
v2.0 Version 2.0 built on 15 October 2011.
In this…

jared
- 5,369
- 2
- 21
- 24
263
votes
3 answers
Switch to another Git tag
How do I check out version version/tag 1.1.4 of the rspec bundle?
cd ~/Library/Application\ Support/TextMate/Bundles/
git clone git://github.com/rspec/rspec-tmbundle.git RSpec.tmbundle
osascript -e 'tell app "TextMate" to reload bundles'

jspooner
- 10,975
- 11
- 58
- 81
245
votes
6 answers
How do I merge a git tag onto a branch
I'm trying to find the syntax for merging a tagged commit onto another branch. I guess it's straightforward but my feeble search attempts aren't finding it.

Jeremy Woodland
- 3,444
- 5
- 17
- 25
235
votes
8 answers
Do Git tags only apply to the current branch?
I'm currently working with a repository that has multiple branches.
When I create a tag, does that tag refer to the then-current branch?
In other words: Whenever I create a tag, do I need to switch to the desired branch and tag inside that branch so…

Gerardo
- 7,457
- 3
- 22
- 17
230
votes
5 answers
Do git tags get pushed as well?
Since I created my repository it appears that the tags I have been
creating are not pushed to the repository. When I do git tag on the
local directory all the tags are present, but when I logon to the
remote repository and do a git tag, only the…

vfclists
- 19,193
- 21
- 73
- 92
217
votes
4 answers
How do you push a Git tag to a branch using a refspec?
I want to force push, for example, my tag 1.0.0 to my remote master branch.
I'm now doing the following:
git push production +1.0.0:master
I want to force the push, because all I care about is that the code inside the 1.0.0 tag is pushed to the…

Michael van Rooijen
- 6,683
- 5
- 37
- 33