We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
现在有2个分支,我们的开发分支feature和主分支master
我们在开发分支已经提交了部分内容
git checkout feature
git rebase master
总结:可以看出我们在feature原来的提交会被删除掉,然后基于master分支的又重新开始新的提交了
**注意: **
永远不要在公共分支进行rebase的操作
rebase的操作并不会改变master分支的内容,master分支还是在c7上,如果要发布上线提mr操作git checkout master git merge feature
git checkout master
git merge feature
重回到我们上面的场景,我们使用merge合并
**总结: ** feature分支的提交不会被删除,和master分支的c6合并成一个新的内容,如果我们此刻基于master分支进行开发的话,就是在c7的位置进行开发
The text was updated successfully, but these errors were encountered:
No branches or pull requests
rebase和merge的区别
场景
现在有2个分支,我们的开发分支feature和主分支master
我们在开发分支已经提交了部分内容
rebase操作
git checkout feature
git rebase master
进行合并总结:可以看出我们在feature原来的提交会被删除掉,然后基于master分支的又重新开始新的提交了
**注意: **
永远不要在公共分支进行rebase的操作
rebase的操作并不会改变master分支的内容,master分支还是在c7上,如果要发布上线提mr操作
git checkout master
git merge feature
merge
重回到我们上面的场景,我们使用merge合并
git checkout master
git merge feature
**总结: ** feature分支的提交不会被删除,和master分支的c6合并成一个新的内容,如果我们此刻基于master分支进行开发的话,就是在c7的位置进行开发
**注意: **
git动画演示链接
The text was updated successfully, but these errors were encountered: