git 合并 Merge 多条提交记录合并为一条
常规操作
- Git merge
看看下面的基本操作
$ git merge feature
$ git checkout feature
# 修改提交 修改提交 多次的记录
$ git checkout master
$ git merge feature
这样最后主分支就会出现很多的开发人员无用的提交记录(你的同事可不想看到这些鬼东西,所以我们需要将有意义的提交上来)。
- git merge –squash feature
> 该命令可以将多次提交的内容合并为一次
$ git merge --squash feature
$ git commit -m "将多条记录合并到一起啦"``
$ git push
来自:https://blog.csdn.net/themagickeyjianan/article/details/80333645
近期评论