git tag - Reverting a branch changes tag name of git describe -
i learned how revert branch. works fine. thing is, tagged master's commits , plan use git describe command create deployments based on latest tag. reverting commit creates new commit, git describe command outputs tag commit ammend, so:
before:
git describe 1-2-0 after revert 'back' commit:
git describe 1-2-0-1ga99ae04 is there way overcome this? or should latest tag differently?
just clear. dont revert "back". have following history.
a<--b<--c<--d | (tag:1-2-0) now revert c. happens.
a<--b<--c<--d<--e | (tag:1-2-0) as can see have moved forward in history. if tag has been released, want consider "hotfix", , tag again 1-2-0-1, or along lines. not sure version number scheme is, work hotfixes process.
considering change hotfix result in this.
(tag:1-2-0-1) | a<--b<--c<--d<--e | (tag:1-2-0) however if have not released or pushed tag remote, , want move tag point e, can 2 ways. easy remember way delete tag , recreate it.
git tag -d 1-2-0 git tag 1-2-0 e the shorter, faster, infinitely less friendly way change tag without deleting use update-ref.
git update-ref refs/tags/1-2-0 e in odd case have pushed tag , want remove remote, use following syntax.
git push <remote> :1-2-0 assuming origin remote.