开发者

In Git, is there a way to automatically mark all newer vesions of files in a merge conflict as correct?

开发者 https://www.devze.com 2023-03-03 04:08 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号