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
3876
votes
24 answers
How to delete a remote tag?
How do you delete a Git tag that has already been pushed?
![](../../users/profiles/97101.webp)
markdorison
- 115,110
- 27
- 52
- 69
2510
votes
11 answers
How do you push a tag to a remote repository using Git?
I have cloned a remote Git repository to my laptop, then I wanted to add a tag so I ran
git tag mytag master
When I run git tag on my laptop the tag mytag is shown. I then want to push this to the remote repository so I have this tag on all my…
![](../../users/profiles/213269.webp)
Jonas
- 97,987
- 90
- 271
- 355
2009
votes
15 answers
Download a specific tag with Git
I'm trying to figure out how I can download a particular tag of a Git repository - it's one version behind the current version.
I saw there was a tag for the previous version on the git web page, with object name of something long hex number.
But…
![](../../users/profiles/64895.webp)
Jack BeNimble
- 33,194
- 33
- 113
- 187
1327
votes
11 answers
How do you rename a Git tag?
Today I was looking through the logs for a project and realized that I fat fingered a tag name some time ago. Is there some way to rename the tag? Google hasn't turned up anything useful.
I realize I could check out the tagged version and make a new…
![](../../users/profiles/44747.webp)
Brandon Fosdick
- 14,113
- 3
- 19
- 19
1075
votes
8 answers
Create a tag in a GitHub repository
I have a repository in GitHub and I need to tag it.
I tagged in a shell, but on GitHub, it is not showing up.
Do I have to do anything else?
The command I used in the shell is:
git tag 2.0
And now when I type git tag it shows:
2.0
So it seems…
![](../../users/profiles/1166854.webp)
Tanel Tammik
- 11,289
- 3
- 17
- 29
1068
votes
8 answers
How to tag an older commit in Git?
We are new to git, and I want to set a tag at the beginning of our repository.
Our production code is the same as the beginning repository, but we've made commits since then.
A tag at the beginning would allow us to "roll back" production to a…
![](../../users/profiles/509856.webp)
hogsolo
- 11,435
- 6
- 22
- 24
975
votes
10 answers
How can I move a tag on a git branch to a different commit?
I created a tag on the master branch called v0.1 like this:
git tag -a v0.1
But then I realized there were still some changes I needed to merge into master for release 0.1, so I did that. But now my v0.1 tag is stuck on (to invoke the post-it note…
![](../../users/profiles/698102.webp)
eedeep
- 10,313
- 3
- 16
- 14
740
votes
10 answers
How to list all Git tags?
In my repository, I have created tags using the following commands.
git tag v1.0.0 -m 'finally a stable release'
git tag v2.0.0 -m 'oops, there was still a major bug!'
How do you list all the tags in the repository?
![](../../users/profiles/54964.webp)
Léo Léopold Hertz 준영
- 119,377
- 159
- 417
- 655
650
votes
12 answers
How is a tag different from a branch in Git? Which should I use, here?
I am having some difficulty understanding how to use tags versus branches in git.
I just moved the current version of our code from cvs to git, and now I'm going to be working on a subset of that code for a particular feature. A few other developers…
![](../../users/profiles/2484.webp)
Bialecki
- 26,315
- 33
- 78
- 103
611
votes
5 answers
What is git tag, How to create tags & How to checkout git remote tag(s)
when I checkout remote git tag use command like this:
git checkout -b local_branch_name origin/remote_tag_name
I got error like this:
error: pathspec `origin/remote_tag_name` did not match any file(s) known to git.
I can find remote_tag_name when…
![](../../users/profiles/4591230.webp)
Ryanqy
- 6,722
- 3
- 12
- 23
606
votes
7 answers
How to create a new branch from a tag?
I'd like to create a new master branch from an existing tag. Say I have a tag v1.0. How to create a new branch from this tag?
![](../../users/profiles/48523.webp)
Andrew
- 196,883
- 184
- 487
- 673
543
votes
24 answers
How to get the latest tag name in current branch in Git?
What's the simplest way to get the most recent tag in Git?
git tag a HEAD
git tag b HEAD^^
git tag c HEAD^
git tag
output:
a
b
c
Should I write a script to get each tag's datetime and compare them?
![](../../users/profiles/171278.webp)
culebrón
- 28,179
- 18
- 66
- 97
535
votes
16 answers
Remove local git tags that are no longer on the remote repository
We use tags in git as part of our deployment process. From time to time, we want to clean up these tags by removing them from our remote repository.
This is pretty straightforward. One user deletes the local tag and the remote tag in one set of…
![](../../users/profiles/144071.webp)
kEND
- 6,149
- 3
- 16
- 13
465
votes
19 answers
How to tell which commit a tag points to in Git?
I have a bunch of unannotated tags in the repository and I want to work out which commit they point to. Is there a command that that will just list the tags and their commit SHAs? Checking out the tag and looking at the HEAD seems a bit too…
![](../../users/profiles/129404.webp)
Igor Zevaka
- 69,206
- 26
- 104
- 125
427
votes
5 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?
![](../../users/profiles/407845.webp)
hurrymaplelad
- 23,777
- 9
- 50
- 72