【发布时间】:2014-11-25 10:31:15
【问题描述】:
为什么git diff 认为没有变化
..即使git status 将它们报告为已修改?
$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: file-added
modified: file-with-changes << it knows there are changes
但为了看到区别,我需要显式添加最后一个回归哈希..
$ git diff
(nothing)
$ git diff rev-hash
diff --git a/file-with-changes b/file-with-changes
index d251979..a5fff1c 100644
--- a/file-with-changes
+++ b/file-with-changes
.
..
【问题讨论】: