-
git diff 对比两个文件修改的记录
-
不带参数的调用
git diff filename
这种是比较 工作区和暂存区
-
比较暂存区与最新本地版本库
git diff --cached filename
-
比较工作区和最新版本
git diff HEAD filename
-
比较工作区与指定的 commit -id 的差异
git diff commit-id filename
-
比较暂存区与指定 commit-id 的差异
git diff --cached commit-id filename
-
比较两个 commit -id 的差异
git diff commit-id commit-id