git查看和操作commit命令

git reflog

显示所有branch的commit,包括commit和reset,以及已删除的commit。而git log只显示当前branch的commit,不包括已删除的commit

git cherry-pick

将一个commit应用到当前branch上,commit可以是其他branch的

git rebase

压缩多个commit为一个commit

将branch1的commit转移到branch2,branch1的commit记录被删除

原文地址:https://www.cnblogs.com/mengff/p/5996680.html