Git merge -s theirs: Simply?

前端 未结 3 1298
余生分开走
余生分开走 2020-12-15 05:48

I have checked out the various questions on this. The first provides a huge question and answer (relevant? not sure) and the second provides a wrong answer as best answer.

3条回答
  •  感情败类
    2020-12-15 06:18

    Ran into this problem the other day:

    httpx://seanius.net/blog/2011/02/git-merge-s-theirs/

    Update: Old url is down. Here is the article via Archive.org's Wayback Machine:

    git merge -s ours ref-to-be-merged
    git diff --binary ref-to-be-merged | git apply -R --index
    git commit -F .git/COMMIT_EDITMSG --amend
    

提交回复
热议问题