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

前端 未结 15 1896
轻奢々
轻奢々 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条回答
  •  Happy的楠姐
    2020-12-12 11:57

    I added the file to the index:

    git add file_name
    

    and then ran:

    git diff --cached file_name
    

    You can see the description of git diff here.

    If you need to undo your git add, then please see here: How to undo 'git add' before commit?

提交回复
热议问题