轉載原文: 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)