Questions tagged [git-tag]

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.

543 questions
4693
votes
29 answers

How can I delete a remote tag?

How can I delete a Git tag that has already been pushed?
markdorison
  • 139,374
  • 27
  • 55
  • 71
3294
votes
13 answers

How do you push a tag to a remote repository using Git?

I added a tag to the master branch on my machine: git tag mytag master How do I push this to the remote repository? Running git push gives the message: Everything up-to-date However, the remote repository does not contain my tag.
Jonas
  • 121,568
  • 97
  • 310
  • 388
2103
votes
16 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…
Jack BeNimble
  • 35,733
  • 41
  • 130
  • 213
1482
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…
Brandon Fosdick
  • 15,673
  • 4
  • 21
  • 20
1472
votes
10 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…
Tanel Tammik
  • 15,489
  • 3
  • 22
  • 31
1275
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…
hogsolo
  • 13,565
  • 6
  • 24
  • 25
1159
votes
13 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…
eedeep
  • 12,183
  • 3
  • 18
  • 14
875
votes
11 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?
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
790
votes
6 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 I…
Ryanqy
  • 8,476
  • 4
  • 17
  • 27
783
votes
9 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?
Andrew
  • 227,796
  • 193
  • 515
  • 708
719
votes
14 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…
Bialecki
  • 30,061
  • 36
  • 87
  • 109
681
votes
25 answers

How can I 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?
culebrón
  • 34,265
  • 20
  • 72
  • 110
656
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…
kEND
  • 7,379
  • 3
  • 19
  • 13
544
votes
22 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…
Igor Zevaka
  • 74,528
  • 26
  • 112
  • 128
523
votes
4 answers

What is the difference between an annotated and unannotated tag?

If I want to tag the current commit. I know both of the following command lines work: git tag and git tag -a -m '' What is the difference between these commands?
user462301
  • 5,339
  • 2
  • 17
  • 11
1
2 3
36 37