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 reinsert my one line change after bringing it over into my branch.
So what’s the easiest way in Git to do this?
Run this from the branch where you want the file to end up:
General formulas:
Some notes (from comments):
myfile.txtandmydirAn alternative: