赞
踩
使用git提交时,发现叠加了多个commit没push,其中包括一些我不想提交的配置文件。
想知道本地未提交的commit,该如何查看?有两个方法:
1.使用 git status
your branch is ahead of ‘origin/master’ by 4 commits
你的分支领先master 4个commit,也就是说我的本地存在4个未push的commit
2.也可以使用git cherry和本地/远程分支进行比较,得出4个commit
git cherry -v origin/master (或者分支名)
git cherry -v 与本地master分支进行比较
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。