git diff

Posted 等风来

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git diff相关的知识,希望对你有一定的参考价值。

git diff  工作区与暂存区的差别

git diff -cached / git diff -staged  暂存区与版本库的差别

git diff HEAD  工作区与版本库的差别

git diff branch1 branch2  两个分支的最新commit的差别

git diff branch1...branch2  自branch1与branch2分开以来,branch2上的变化

git diff --stat  查看简单的diff结果

git diff branch1  查看当前目录与另外一个分支的差别

git diff HEAD -- ./lib  显示当前目录的lib目录和上次提交之间的差别

git diff HEAD^ HEAD  查看上次提交与上上次提交的差别

git diff commit1 commit2  查看两次提交之间的差别

以上是关于git diff的主要内容,如果未能解决你的问题,请参考以下文章

11-5,11-6笔记

shell文件处理工具

Linux学习笔记9

二. 第六单元.shell脚本命令

linux学习笔记6

比较 XML 忽略元素顺序