Git branch has diverged after rebase, so why rebase?

拜拜、爱过 提交于 2019-12-02 20:34:54

The idea is to rebase only if you haven't pushed yet, to replay your local commits.

As soon as you have pushed (and are working in a team), you should not rebase the branch on top of master, as it rewrites its SHA1, forcing you to force push the new state of the branch.

Making a git merge master into your branch is preferable here: you resolve the conflicts locally, then you can more commits, and a regular push.

See more at "What is the difference between merging master into branch and merging branch into master?"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!