Git - some files are marked as changed but 'git diff' doesn't show anything

前端 未结 6 708
广开言路
广开言路 2021-02-02 07:11

I am quite new to Git, thus maybe I am missing something here.

dan@one:/var/www/$ git status -s
M  GoogleChromeExtension.js
M  ApiClient.js

So

6条回答
  •  暖寄归人
    2021-02-02 07:43

    Depending on exactly what is going on, there may be two solutions to this. It would be best if you didn't use short mode since it hides information important for debugging this.

    If you expect changes, try running git diff HEAD to compare the working directory to the last commit. If you have already git added the changes, the default git diff action will be to not show those differences. See the http://git-scm.com/docs/git-diff man page DESCRIPTION which talks about this. The git status output (without -s) would help everyone see whether this was the case.

    Alternately, if you didn't expect changes, this could be an OS/filesystem problem. Please report your OS and filesystem information.

提交回复
热议问题