git ls-files: howto identify new files (added, not committed)?

前端 未结 3 1112
伪装坚强ぢ
伪装坚强ぢ 2021-01-30 00:39

After I called git add the command git status will show me something like:

...
new file:    

3条回答
  •  梦如初夏
    2021-01-30 01:12

    Clarification: This is a way to show the files that I intend to add. This is not what the OP was looking for, but I'll leave this post in case it's useful to others.

    This seems to show only the files that I have added [to my working copy, not the index] but aren't matched by my standard ignore patterns:

     $ git ls-files --others --exclude-standard
    

    Without --exclude-standard, it also shows files that are ignored when I run git status.

提交回复
热议问题