If you absolutely need to "move" the tag instead of creating a new one, You can do this:
NB: As @Chris said, make sure you have a good reason for not wanting to create a new tag because the best practice is to create a new one
1. Checkout the tag (a Detached HEAD)
git checkout tag/v1.1
2. Create and Checkout a branch off that tag (i.e. Branching off the tag)
git checkout -b my-tagged-branch
*** do work and commit changes ***
3. Push to the remote branch.
git push -u origin my-tagged-branch
If needed merge branch into other branches that need the change (in case of a bug fix for example)
4. While still on my-tagged-branch
, Delete the tag
git tag -d v1.1
5. Create the tag again: This will "move" the tag to point to your latest commit on that branch
git tag v1.1
6. Delete the tag on remote
git push origin :v1.1
7. Create the tag on remote
git push origin v1.1
git describe
won't return the tag name. If you want the exact name of a tag the commit in question must be tagged.git describe
shows your current state (latest tag + commits since then, (a few digits of) the current HEAD's hash), i.e.,v1.1-g2dcc97
says "tagv1.1
, hash for that commit is2dcc97...
"git describe
is showing more than just the tag name. Your tag has not been renamed.git describe
is just showing an abbreviation of the commit hash to which your tag points.