Reputation: 669
With Git I have done a pull on the other developers branch, then I merged into my branch. When I ran the app I realized the other developer forgot to check in a new resource, he promptly checked it in. How do I grab that new file while I'm in the middle of a merge?
I don't want to lose all the work I did with the mergetool by undoing what I have so far. I also don't want to check it in as I can't test it without the resource file and I don't want to check in broken code.
Upvotes: 3
Views: 93
Reputation: 1328282
You could:
checkout the file from origin/otherBranch (as in "How to get just one file from another branch")
git checkout origin/otherBranch -- aFile
That would override 'aFile
' though, which means I assume your merge in progress doesn't involve that file, or the work o it would be lost.
As The OP Ian Hern mentions, you also can checkout the branch after pulling the other branch.
Redoing a merge then can work.
Upvotes: 2
Reputation: 669
I was able to checkout that other branch, do a pull, and then checkout my mid-merge branch again. And then ran merge again and it added it in.
Upvotes: 0