0 votes
1 view
in Devops and Agile by (28.1k points)

I've got two branches that are fully merged together.

However, after the merge is done, I realise that one file has been messed up by the merge (someone else did an auto-format, gah), and it would just be easier to change to the new version in the other branch, and then re-insert my one line change after bringing it over into my branch.

So what's the easiest way in git to do this?

1 Answer

0 votes
by (48k points)

Let’s resolve the issue with an example

git tag -a v1.2 9fceb02 -m"Message here"

Where 9fceb02 is the beginning part of the commit id. You can then push the tag using 

git push origin v1.2

You can do a git log to show all the commit IDs in your current branch.

Warning: This creates tags with the current date

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...