git rebase(变基)应用场景
发布时间:2024年01月01日
git rebase(变基)应用场景
使得提交记录变得简洁
现在我们模拟我们有多次提交记录,本地仓库有三条提交

整合成一条提交记录
1.git rebase -i HEAD~3
提交记录合并 HEAD~3合并三条记录
执行之后

然后把pick变成s

s的意思是当前版本合并到上一个版本去
最终q3,q2两个版本都合并到q1版本上面去
:wq保存一下
然后就会提示

这三个是我们之前commit的提交记录的信息,现在我们要写合并后的信息

完成合并

git log查看一下
g-UStdesoz-1704082881477)]
git log查看一下

文章来源:https://blog.csdn.net/weixin_46039528/article/details/135323905
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:chenni525@qq.com进行投诉反馈,一经查实,立即删除!