'git status' shows changed files, but 'git diff' doesn't

前端 未结 15 1913
轻奢々
轻奢々 2020-12-12 11:37

I\'ve had a look at all similar questions. However, I\'ve double checked and something strange is definitely happening.

On one server (Solaris with Git 1.8.1) I clon

15条回答
  •  南笙
    南笙 (楼主)
    2020-12-12 12:01

    I've just run in a similar issue. git diff file showed nothing because I added file to the Git index with some part of its name in uppercase: GeoJSONContainer.js.

    Afterwards, I've renamed it to GeoJsonContainer.js and changes stopped being tracked. git diff GeoJsonContainer.js was showing nothing. I had to remove the file from the index with a force flag, and add the file again:

    git rm -f GeoJSONContainer.js
    git add GeoJSONContainer.js
    

提交回复
热议问题