search

Home  >  Q&A  >  body text

git rebase and merge

Develop the main branchmaster,
I need to make a new function and built a new branchmaster on A. The development cycle is relatively long.
After A is developed, the master branch has gone through several versions of submissions.
At this time, when I merged to the master branch: Did
branch A directly merge into master?
Or pull the master branch to my latest branch?
or rebase on A branch?

Please give me some advice~ Thank you.

迷茫迷茫2801 days ago709

reply all(4)I'll reply

  • 淡淡烟草味

    淡淡烟草味2017-05-02 09:44:16

    Don’t touch the master, put the conflict resolution on branch A. The standard approach is to rebase master on your branch A, resolve the conflict and push it and then initiate a PR

    reply
    0
  • PHP中文网

    PHP中文网2017-05-02 09:44:16

    Merge or rebase (if this branch has no other users) master on A. Then test it and merge it back to master after passing it.

    reply
    0
  • PHP中文网

    PHP中文网2017-05-02 09:44:16

    It’s enough to just pull to master

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-02 09:44:16

    git chekout A
    git rebase origin/master
    git checkout master
    git rebase A

    Conflicts are resolved on A and then merged into master

    reply
    0
  • Cancelreply