2

I have don a git svn rebase and I got a conflict. I want to use git-merge-file to merge the two versions of the file by choosing the version on the server. git-merge-file has this option called --theirs but git-merg-file takes 3 parameters. How can I pass it just my file that contains the conflict markers and make it choose their version?

I also tried git merge -Xtheirs file.cpp but it doesn't work.

Jacob Krieg
  • 2,834
  • 15
  • 68
  • 140

1 Answers1

8

Maybe you can try:

git checkout --ours file.cpp
git add file.cpp

if you simply want to drop your local changes in favour of the upstream version.

Indeed, in the case of a rebase, --ours is the upstream, while --theirs are your local changes.

Pierre
  • 1,322
  • 11
  • 17
  • I did some tests using git-svn and I found out that --theirs gives me my version, and --ours gives me the version on the svn server. Do you have any idea why and if it's normal? – Jacob Krieg Jun 15 '13 at 16:21
  • 1
    @JasonSwartz See http://stackoverflow.com/questions/2959443/why-is-the-meaning-of-ours-and-theirs-reversed-with-git-svn – Max Nanasy Oct 31 '13 at 01:56