In Git, is there a way to automatically mark all newer vesions of files in a merge conflict as correct?
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 v开发者_C百科ersions as correct rather than having to do it for every individual file (I'm working with ~1000 files)
Thanks
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.
精彩评论