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

前端 未结 5 1477
挽巷
挽巷 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 04:56

    Resolving a conflict is just like dealing with any other work in progress. All changes must be staged (git add) and then committed. Files which have successfully auto merged are already staged. Conflicted files are not.

    Edit the conflicted files to your satisfaction, stage them (git add), and when that is all done, git commit.

    In your case specifically...

    • Edit test.cpp to fix the conflicts (they have <<<< markers)
    • git add test.cpp
    • Run your tests to make sure everything is ok.
    • git commit

提交回复
热议问题