Trouble merging upstream changes back into my branch

前端 未结 5 495
情书的邮戳
情书的邮戳 2020-12-12 22:17

I\'m running into conflicts while trying to merge upstream changes back into my branch and I\'m not sure how to resolve them.

I created my own fork. I cloned it. I m

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-12 22:40

    The "git merge" command tries to incorporate changes from another branch onto the present branch. If the merge is clean, meaning no conflicts, it will commit. Since your merge did have conflicts, it didn't commit. You need to resolve the conflict.

    Pulling the copy from the upstream repo is one way to do that - by accepting the upstream repo's version. You can do that within git using "git checkout --theirs conflicting_file.txt"

    Editing the file to get it into the shape you want is another way.

    Once it's fixed, you need to add using "git add conflicting_file.txt" then commit. Then your working copy is clean and ready for more hacking. Good luck.

提交回复
热议问题