I’m currently in branch ‘foo’. I just ran git merge master. Only problem is there was a certain file in foo that I wanted to keep. Is there a way to get it back but keep all the other changes from merge master?
I’m currently in branch ‘foo’. I just ran git merge master . Only problem
Share
Try something like this:
This will roll your fileback one commit. If you want to go back further to a specific commit, you can use a commit hash or append ^N to the end of the HEAD keyword, e.g.
HEAD^2.