search

Home  >  Q&A  >  body text

Version control - Github received a pull request and new code was added locally. How to merge the github code into the local code?

The situation is like this, assuming that commit A is in a certain github, and commit A is also committed locally. At this time, I wrote some new code locally and reached commit B. At this time, I received a pull request on github, github When I reach commit C, I want to synchronize the github code to the local while keeping the code under commit B from being overwritten. What should I do? Looking for a solution.

黄舟黄舟2812 days ago578

reply all(2)I'll reply

  • 迷茫

    迷茫2017-05-02 09:35:56

    You can just git pull directly. If there is a conflict, just resolve the conflict

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-02 09:35:56

    If you don’t want to be overwritten, just open another branch and pull request. Once your code is written, merge it into the newly opened branch and submit it again

    reply
    0
  • Cancelreply