git diff 差异对比

转载原文: http://fsjoy.blog.51cto.com/318484/245465/

1. 查看当前所有的更改情况。git status

git diff 差异对比

结果有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 差异对比

git diff 差异对比

git diff 差异对比

修改一下这个文件, 执行git status 的话,  “changes not staged for commit”.(要先git  add ./ 再git commit)

git diff 差异对比

git diff 差异对比

上一篇:JAVA基础之对象的初始化


下一篇:解决 未能从程序集“System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载