Skip to main content

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.

Filter by
Sorted by
Tagged with
4870 votes
31 answers
2.2m views

How can I delete a remote tag?

How can I delete a Git tag that has already been pushed?
markdorison's user avatar
3501 votes
13 answers
2.2m views

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 ...
Jonas's user avatar
  • 126k
2127 votes
16 answers
1.7m views

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, ...
Jack BeNimble's user avatar
1568 votes
10 answers
1.7m views

Create a tag in a GitHub repository

I have a GitHub repository and I need to tag it. I created a tag in a shell using the following command: git tag 2.0 git tag >>> 2.0 The tag does exist locally, but does not appear on GitHub....
Tanel Tammik's user avatar
  • 16.5k
1515 votes
12 answers
411k views

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 ...
Brandon Fosdick's user avatar
1324 votes
8 answers
485k views

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 ...
hogsolo's user avatar
  • 14.1k
1212 votes
13 answers
588k views

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 ...
eedeep's user avatar
  • 12.7k
921 votes
11 answers
998k views

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 ...
Léo Léopold Hertz 준영's user avatar
860 votes
6 answers
1.1m views

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) ...
Ryanqy's user avatar
  • 9,176
819 votes
10 answers
639k views

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's user avatar
  • 235k
732 votes
15 answers
289k views

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 ...
Bialecki's user avatar
  • 30.7k
714 votes
26 answers
496k views

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's user avatar
  • 35.7k
699 votes
16 answers
278k views

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 ...
kEND's user avatar
  • 7,809
567 votes
7 answers
646k views

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 <tag_name> <repo_url> But it ...
Jiang Jun's user avatar
  • 5,955
565 votes
22 answers
323k views

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 ...
Igor Zevaka's user avatar
  • 75.9k
548 votes
4 answers
192k views

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 <tagname> and git tag -a <tagname> -m '<message>' What is the difference between these ...
user462301's user avatar
  • 5,599
502 votes
11 answers
217k views

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 ...
still_dreaming_1's user avatar
483 votes
6 answers
316k views

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 ...
hurrymaplelad's user avatar
400 votes
8 answers
67k views

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. ...
Ben Blank's user avatar
  • 56k
366 votes
20 answers
128k views

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 ...
Ionică Bizău's user avatar
317 votes
2 answers
88k views

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,...
atx's user avatar
  • 5,001
314 votes
8 answers
129k views

Is there a standard naming convention for git tags? [closed]

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 ...
troelskn's user avatar
  • 117k
311 votes
6 answers
283k views

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 ...
davidA's user avatar
  • 13.3k
299 votes
7 answers
258k views

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 ...
grm's user avatar
  • 5,357
297 votes
11 answers
134k views

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 ...
jared's user avatar
  • 5,499
276 votes
3 answers
381k views

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 '...
jspooner's user avatar
  • 11.2k
262 votes
6 answers
279k views

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's user avatar
247 votes
9 answers
172k views

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 ...
Gerardo's user avatar
  • 7,647
239 votes
5 answers
104k views

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 ...
vfclists's user avatar
  • 19.8k
217 votes
4 answers
138k views

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 ...
Michael van Rooijen's user avatar
205 votes
7 answers
136k views

"Updates were rejected because the tag already exists" when attempting to push in SourceTree

When attempting to Push via Source Tree, I get the following error: git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags origin refs/heads/master:...
Senseful's user avatar
  • 90.3k
190 votes
2 answers
137k views

Checking out Git tag leads to "detached HEAD state"

I'm developing a deployment script for my git project and I just started using tags. I've added a new tag called v2.0: git tag -a v2.0 -m "Launching version 2.0" And I've pushed this tag to the ...
Khriz's user avatar
  • 5,958
175 votes
9 answers
230k views

“tag already exists in the remote" error after recreating the git tag

I get the following error after I run the steps below: To [email protected]:username/repo-name.git ! [rejected] dev -> dev (already exists) error: failed to push some refs to 'git@provider....
Luca Boieru's user avatar
  • 2,280
159 votes
6 answers
79k views

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 ...
wufoo's user avatar
  • 14.3k
150 votes
7 answers
85k views

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/...
HNygard's user avatar
  • 4,676
143 votes
8 answers
67k views

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 ?
Quang Van's user avatar
  • 12k
131 votes
5 answers
29k views

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?
G. Sylvie Davies's user avatar
107 votes
3 answers
72k views

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?
Aik's user avatar
  • 3,668
95 votes
3 answers
52k views

How do you remove a tag from a remote repository

Is it possible to untag a revision that has been push upstream using git. This is what has happened: git tag 1.1 git push --tags origin master Doh! That was meant to be version 1.1beta Can you rebase ...
serby's user avatar
  • 4,256
93 votes
8 answers
66k views

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 ...
mlb's user avatar
  • 1,282
87 votes
4 answers
50k views

"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 ...
knipknap's user avatar
  • 6,104
86 votes
7 answers
83k views

Git force push tag when the tag already exists on remote

I have a tag already pushed onto the remote. When another user creates the same tag and tries to push, the push will fail because the tag already exists on the remote. But I thought if I did --f force ...
user3606175's user avatar
  • 2,133
81 votes
7 answers
58k views

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
fl00r's user avatar
  • 83.5k
81 votes
2 answers
103k views

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 ...
user avatar
80 votes
1 answer
58k views

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 ...
Chris Muench's user avatar
77 votes
3 answers
49k views

Fetch a single tag from remote repository

This command fetches all tags: git fetch origin --tags This command fetches a specific tag: git fetch origin refs/tags/1.0.0 But that doesn't let me do: git checkout tags/2.3.18 How can I fetch ...
aleclarson's user avatar
  • 18.7k
74 votes
3 answers
42k views

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, ...
user1699176's user avatar
72 votes
3 answers
161k views

Understanding Gitlab CI tags

I've read documentation, some articles and you might call me dumb, but this is my first time working with a concept like this. I've registered runner with tag "testing" created tag "testing" in ...
RiddleMeThis's user avatar
65 votes
6 answers
118k views

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....
Matthieu's user avatar
  • 663
62 votes
3 answers
26k views

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 ...
idanshmu's user avatar
  • 5,191

1
2 3 4 5
12