Take the 2-minute tour ×  I have conflicting branches, branch2
branched from branch1.  Let's say when rebasing branch2 on
current branch1, while resolving conflicts, I decide to take
some (not all) of "their" (i.e. branch1) files as-is. How do I
do that?  I tried:  git checkout branch1:foo/bar.java fatal:
reference is not a tree: TS-modules-tmp:foo/bar.java  git
checkout refs/heads/branch1:foo/bar.java fatal: reference is not
a tree: refs/heads/TS-modules-tmp:foo/bar.java share|improve
this question Note: if you're rebasing branch2 onto branch1, the
replaying happens relative to branch1, so "theirs" is actually
branch2 and "ours" is branch1. git.661346.n2.nabble.com/… –  Mr
Fooz May 29 '12 at 22:20 add comment  3 Answers  up vote 48 down
vote accepted  I think you are looking for  git checkout
--theirs foo/bar.java git add foo/bar.java  Then you can git
rebase --continue after you've resolved all conflicts.  Edit
7/16/2013: I believe my answer is correct for the question
asked. The question asked is how to ch