How do you rebase the current branch's changes on top of changes being merged in?

后端 未结 2 2109
余生分开走
余生分开走 2020-12-22 18:27

Okay. If I\'m on a branch (say working), and I want to merge in the changes from another branch (say master), then I run the command git-merg

相关标签:
2条回答
  • 2020-12-22 19:10

    Another way to look at it is to consider git rebase master as:

    Rebase the current branch on top of master

    Here , 'master' is the upstream branch, and that explain why, during a rebase, ours and theirs are reversed.

    0 讨论(0)
  • 2020-12-22 19:23

    You've got what rebase does backwards. git rebase master does what you're asking for — takes the changes on the current branch (since its divergence from master) and replays them on top of master, then sets the head of the current branch to be the head of that new history. It doesn't replay the changes from master on top of the current branch.

    0 讨论(0)
提交回复
热议问题