When do you use Git rebase instead of Git merge?

后端 未结 17 2381
独厮守ぢ
独厮守ぢ 2020-11-21 11:25

When is it recommended to use Git rebase vs. Git merge?

Do I still need to merge after a successful rebase?

17条回答
  •  忘了有多久
    2020-11-21 12:08

    This sentence gets it:

    In general, the way to get the best of both worlds is to rebase local changes you’ve made, but haven’t shared yet, before you push them in order to clean up your story, but never rebase anything you’ve pushed somewhere.

    Source: 3.6 Git Branching - Rebasing, Rebase vs. Merge

提交回复
热议问题