1

Git 一直告诉我需要提交一个文件:

D:\ecs [master +0 ~1 -0]> git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   core/src/main/resources/templates/html/core/ContentStoreView.ftl
#

我没有看到对该文件的更改:

D:\ecs [master +0 ~1 -0]> git diff core/src/main/resources/templates/html/core/ContentStoreView.ftl

我尝试提交:

git commit -m "commiting you" .

我明白了

# On branch master
nothing to commit, working directory clean

以及检查:

D:\ecs [master +0 ~1 -0]> git checkout core/src/main/resources/templates/html/core/ContentStoreView.ftl

这个文件有什么问题,我该如何解决?(我git version 1.8.0.msysgit.0在 Windows 上使用)

更新:从 Netbeans IDE 提交后问题消失了。这当然不是一个通用的解决方案,也不能帮助我理解问题所在。

4

1 回答 1

2

git diff --staged (or git diff --cached) will show you the modifications that have been staged but not committed.

于 2013-04-23T05:51:15.360 回答