git diff 差異對比


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

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM