git merge 将多个commit合并为一条之--squash 选项


转自:

https://blog.csdn.net/themagickeyjianan/article/details/80333645

 

改进版本:合并多个提交为一条(git merge --squash branchname)

但是,操作方便并不意味着这样操作就是合理的,在某些情况下,我们应该优先选择使用--squash选项,如下:

$ git merge --squash anotherbranch $ git commit -m "squash merge description"



免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM