Tags are more to mark something fixed in time (a release for example). However, if you want to use tags, you can use git tag -f tagName commitHash
manually to update it.
This being said, maybe you would want to use a branch instead of a tag. Branches are more flexible in term of being "moved around". Say you have the following:
commit beba35 (yourBranch)
aaa
commit 2d34d4 (yourBranchTag)
bbb
commit be2f8a
cccc
(masterBranch)
Instead of rebasing yourBranch
on top of masterBranch
, you can rebase yourBranchTag
on top of masterBranch
and then rebase yourBranch
on top of yourBranchTag
.
You end up having to maintain them in the order, but they would all stay in the same ancestors line.
Having this yourBranchTag
branch does not mean that you will keep it or merge it, maybe it is just to keep a "bookmark" in your log. Once you are done with yourBranch
and it's ready to be merged in masterBranch
, you can then ditch yourBranchTag
.