git pull and resolve conflicts

前端 未结 5 926
清酒与你
清酒与你 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条回答
  •  -上瘾入骨i
    2020-12-14 02:47

    Best way from my experience is:

    1. When working on a new feature, make a new branch cloned from the master. Always keep the branches up to date with the master.
    2. After writing and committing your new features to the created branch, you test your app.
    3. Then merge master into the working branch, if there are new commits in the master, you may have merge-conflict. After resolving it - test again.
    4. If everything is working as supposed to merge your branch to the master.

    That's how you can develop many new features and merge only the working ones when you need to deploy. Good luck and check this -> https://www.codeschool.com/courses/try-git

提交回复
热议问题