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]
473 questions
149
votes
8 answers
“tag already exists in the remote" error after recreating the git tag
I get the following error after I run the steps below:
To git@provider.com:username/repo-name.git
! [rejected] dev -> dev (already exists)
error: failed to push some refs to 'git@provider.com:username/repo-name.git'
hint: Updates were…
![](../../users/profiles/2621606.webp)
Luca Boieru
- 2,011
- 4
- 14
- 15
123
votes
6 answers
Why should I use tags vs. release/beta branches for versioning?
I've been using git for about a year and would like to use tagging to, well, tag commits at different versions. I've found lots of info on the commands to use to work with tags, but what I'd like to know is why use tagging at all if I can just…
![](../../users/profiles/566145.webp)
wufoo
- 10,915
- 12
- 49
- 78
118
votes
8 answers
Git Tag list, display commit sha1 hashes
so the git tag command lists the current git tags
tag1
tag2
git tag -n prints tag's message
tag1 blah blah
tag2 blah blah
What's the best way to get the hash of tag1 & tag2 ?
![](../../users/profiles/400836.webp)
Quang Van
- 9,955
- 11
- 49
- 54
99
votes
7 answers
Get the time and date of git tags
I have a project that is using git and have tagged all the releases with a tag.
$ git tag
v1.0.0
v1.0.1
v1.0.2
v1.0.3
v1.1.0
My goal is to list the releases and release dates in a web interface (tag/commit date = release date). Currently we list…
![](../../users/profiles/298195.webp)
HNygard
- 3,926
- 4
- 28
- 38
84
votes
4 answers
How can I tell if a given git tag is annotated or lightweight?
I type git tag and it lists my current tags:
1.2.3
1.2.4
How can I determine which of these is annotated, and which is lightweight?
![](../../users/profiles/5819286.webp)
G. Sylvie Davies
- 3,849
- 2
- 16
- 28
84
votes
1 answer
What names are valid git tags?
I have got a error message while creating tag containing [ character:
fatal: '[' is not a valid tag name.
Question: are there any rules for tags in the git?
![](../../users/profiles/373249.webp)
Aik
- 2,723
- 2
- 15
- 17
77
votes
4 answers
"git describe" ignores a tag
In the following lines:
$ git tag -n1
v1.8 Tagged the day before yesterday
v1.9 Tagged yesterday
v2.0 Tagged today
$ git describe
v1.9-500-ga6a8c67
$
Can anyone explain why the v2.0 tag is not used by "git describe", and how…
![](../../users/profiles/166442.webp)
knipknap
- 5,182
- 5
- 34
- 40
74
votes
1 answer
git tag delete and re-add
On git hub I re-added the tag by doing:
git tag -d 12.15
git push origin :refs/tags/12.15
git tag -a 12.15 -m '12.15'
git push --tags
The tag is still referring to the old tag on github, but locally it is done right.
UPDATE: It seems github is…
![](../../users/profiles/627473.webp)
Chris Muench
- 15,874
- 66
- 193
- 332
70
votes
8 answers
In git, how do I sync my tags against a remote server?
Is there a way to keep my local git tags in lockstep with a remote's tags? That is -- not only get new tags when created (as usual, when fetch-ing/pull-ing), but also prune tags no longer on a remote and also delete existing tags when someone else…
![](../../users/profiles/1380835.webp)
mlb
- 1,042
- 1
- 7
- 12
61
votes
2 answers
Adding Tags to a Pull Request
I have a repo iontech/Anagen forked from agiliq/Anagen
I made a few commits to my fork and added a tag. Then I opened a Pull Request. This Pull Request includes only my commits.
How do I include the tag I've created into the Pull Request?
user1062640
56
votes
3 answers
Git tag before or after merge?
I have a simple question about tagging different versions of my project with git. If I just completed my 1.1 branch and plan to merge it into master, should I tag this branch as 1.1 before I merge it, or should I merge it to master and then tag it…
![](../../users/profiles/1699176.webp)
user1699176
- 663
- 1
- 5
- 5
56
votes
6 answers
Get last git tag from a remote repo without cloning
How to get last tag from a (non checked-out) remote repo?
On my local copy I use describe
git describe --abbrev=0 --tags
But I cannot use describe with remote storage
![](../../users/profiles/298624.webp)
fl00r
- 79,728
- 29
- 207
- 231
53
votes
5 answers
how to close a branch in git
When I know I won't use a branch any more is it possible to close or lock it? Actually I would like to close a branch but I don't think it is possible to close a branch with GIT. what about the delete. What happens to my history when I delete a…
![](../../users/profiles/5916543.webp)
Matthieu
- 543
- 1
- 4
- 7
52
votes
3 answers
What happen to Git tags pointing to a removed commit
Say I do the following:
Create branch X
Create Tag t (to branch X)
Push
Remove branch X
What happen to tag t? is it just floating there? is it considered as garbage?
Should I remove all tags pointing at branch before removing the branch…
![](../../users/profiles/1798187.webp)
idanshmu
- 4,621
- 4
- 39
- 81
52
votes
4 answers
Git - Checkout a remote tag when two remotes have the same tag name
I had hoped this would work:
git checkout remote/tag_name
but it doesn't. This does:
git checkout tags/tag_name
but I'm doing something weird where I have a lot of remotes, and I'm worried about what happens if two remotes have the same tag. Is…
![](../../users/profiles/171916.webp)
Narfanator
- 4,951
- 3
- 32
- 57