How to force a merge to succeed when there are conflicts?

前端 未结 5 1482
挽巷
挽巷 2020-12-15 04:36

I\'m trying to merge a pull request that has one conflict in one file (see below). The instructions for merging the pull request are provided by github are as follows. Its i

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-15 05:05

    If you know the changes in the current working branch is what you want, you can simply add ours flag to a git merge.

    git merge -s ours master
    

    This effectively ignores all other branch changes and guarantees the merge output is that of the current working branch.

    More info and strategies here : https://www.atlassian.com/git/tutorials/using-branches/merge-strategy

提交回复
热议问题