I am facing issue that I would like to use more tags for specific commit (last one or in history). For example I would like to have commit which contain tags: "v1.2" and "Release" or "XF-update".
First step is to create and push tags:
I can create tag(s):
git tag v1.2
git tag Release
git tag XF-update
I can push them (each separate for safety):
git push remote v1.2
git push remote Release
...
or all together
git push --tags
note: tag Release or XF-update will be push just once and never more, they will be re-use in branch on many places. so I want to say that I want to tag many commits with the same tag. So after month I will create just new tag "v1.4" and not create XF-update tag anymore but still want to use that tag for commits.
Second step is to make a commit about changes:
- just regular code changes and commit them. note: question is in this case of commit I can already put tags and push it. But to be honest I will prefer to finish commit, push it to remote and in next step start connecting tags to specific commits.
Third step should be to make relation between already created tags and commits in history.
- by commits in history I mean even last commit, or week old commit (always by hash id)
And here is the problem. I dont know how to say to git that commit with hash "xxxxxxxxxxxxxxxxxxxxxxxxxxx"should be tagged with tags "v1.2" and also with tag "XF-update" (which are already created and pushed). I can imagine to make it even in separate steps:
- add one specific tag to one specific commit
- add second specific tag to the same specific commit
- ....
Any advice? I am using fork and in GUI I am not able to click it by hand, so I need to use git bash which is integrate there. (its not big deal to write few lines, but dont know what should be steps of this specific way)
Thank you!
git tag -fto have Git do the same thing (remove the old tag and make a new tag). But you will only be tagging one commit. Humans generally do not expect tags to "move", so make sure that this is acceptable before you proceed.