4

So I've come across a merge conflict with my repo, the older versions are all ~1 month old, is there any simple command to mark all the newer versions as correct rather than having to do it for every individual file (I'm working with ~1000 files)

Thanks

wyqydsyq
  • 1,932
  • 1
  • 19
  • 27
  • 1
    Look at [this](http://stackoverflow.com/questions/173919/git-merge-s-ours-what-about-their) topic. – Ikke May 05 '11 at 07:19

1 Answers1

8

As described in the Git merge command, the recursive strategy accepts the ours and theirs options, among others. Both options resolve conflicts by overwriting the existing or incoming versions, respectively.

I don't know which version is the newer in your case, so I cannot tell you exactly which of the two options you should specify, but I guess you'll figure it out.

Note: As pointed out by @Mark Longair, the ours strategy also exists, but has a different effect than the ours option to the recursive strategy. Be careful not to confuse them.

Laurent Pireyn
  • 6,457
  • 1
  • 26
  • 37
  • 6
    +1 This is the right answer, I think, but you might want to emphasize that this is the `ours` and `theirs` option to the merge strategy (which are about automatically resolving conflicting hunks), and *not* the `ours` merge strategy, which discards everything from the other parent. – Mark Longair May 05 '11 at 08:09