Some time ago I created a branch from my master
branch. Let\'s call it new_feature
. While I was working on new_feature
, the master
As mention in the comment there are several strategies in the documentation. You can also find them here: http://git-scm.com/docs/git-merge
You are looking for either git merge -s recursive -X ours
or git merge -s recursive -X theirs
depending on the branch that you are on. Be careful with these as you can accidentally miss changes to your files from the other branch and these would be overwritten.
Another method, which I prefer due to more control, is to git checkout <other-branch> -- <list of files>
. This way I don't accidentally overwrite a file with the wrong changes.