git pull and resolve conflicts

前端 未结 5 929
清酒与你
清酒与你 2020-12-14 02:15

I am learning git and I have a scenario:

  1. My coworker makes changes and pushes the changes to the master.
  2. I make changes locally to my master.
5条回答
  •  一向
    一向 (楼主)
    2020-12-14 02:46

    One (simple*) way to handle this without branching or stashing:

    1. stage/commit your changes locally
    2. pull remote
    3. at this point you'll be notified of any merge conflicts. If git cannot automatically resolve merge conflicts, it will open the two versions in whatever editor you have set up as your default merge editor. I recommend BeyondCompare.
    4. commit your merge, push your merge and commits remote master

提交回复
热议问题