版本比较

标识

  • 该行被添加。
  • 该行被删除。
  • 格式已经改变。

...

使用rebase功能,将多次本地commit合并成一次push到远程,并且重写push日志,这点配合dev分支,简单无敌,不但可以随便在本地造,还可以推送到远程,只要造完将dev分支删除即可。


参考:https://stackoverflow.com/questions/7744049/git-how-to-rebase-to-a-specific-commit

使用rebase合并分支上的某个commit到master分支,比如下面的操作:

to

instead of

操作方法:

代码块
git branch temp master^
git checkout topic
git rebase temp
git branch -d temp