git diff

看風景就發表於2016-10-26

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  檢視兩次提交之間的差別

相關文章