Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
How to move a tag in git?
I have created a tag in my project, using git tag v2023
However, I forgot to commit a few changes.
Now I would like to move this tag to the current point (after having committed the changes I had missed).
According to the docs, it is possible to delete tags using git tag -d v2023
After this command I can just create the tag again.
However, this feels a bit clumsy.
Is there is a more elegant way to move git tags around?
1 answer
The following users marked this post as Works for me:
User | Comment | Date |
---|---|---|
mr Tsjolder | (no comment) | Jul 26, 2023 at 13:59 |
You can (forcibly) replace a tag with the -f, --force
flag:
git tag -f v2023
(assuming the current HEAD
is where you want the tag to end up)
1 comment thread