In a merge with conflicts, is there a way to tell git to keep one version for a set of files?
$ git checkout some_branch
$ git merge origin/master
$ ?
In a merge with conflicts, is there a way to tell git to keep one version for a set of files?
$ git checkout some_branch
$ git merge origin/master
$ ?
If you've already attempted the merge and are looking at the unmerged files, you can use git checkout:
git checkout some_branch
git merge origin/master
<conflicts!>
git checkout --theirs -- <dir>|<file>
(and of course, --ours
keeps the version from the current branch)