转载原文: http://fsjoy.blog.51cto.com/318484/245465/
1. 查看当前所有的更改情况。git status
结果有3部分,changes to be commited, changes not staged for commit, untracked files
2.那么有哪些命令查看具体的改动呢?
git diff --staged 仅查看1的变化(changes 【staged】to be commited)
git diff 仅查看2的变化(changes 【not staged】to be commited)
git diff HEAD 查看1,2,3所有的变化
git diff HEAD
修改一下这个文件, 执行git status 的话, “changes not staged for commit”.(要先git add ./ 再git commit)