首页 > 代码库 > git diff 差异对比

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 diff 差异对比