Merge code using sourceTree+ Webstorm

Principles for resolving conflicts by merging code

  • He did not change, with others to change
  • 2. Check the submission record to see what others have changed, and see if they can keep it at the same time. If not, discuss with the other party how to keep it (you can directly choose to copy the required code and keep it).
  • They are on both sides of the correction, with the latest one

2. Merge code step (branch A merge to branch B)

  • Note: Branch A is the main branch (using the sourceTree tool)
  • 1. Pull A branch from branch A as copy A
  • 2. Right-click on branch B, merge B to copy A, resolve conflicts, commit, push
    • Open WebStorm to resolve conflicts (Sourcetree also works, webStorm is more convenient)
  • Merge copy B back to branch A, then push the completed code