Can I use git diff on untracked files?

前端 未结 10 1128
你的背包
你的背包 2020-11-27 09:58

Is it possible to ask git diff to include untracked files in its diff output, or is my best bet to use git add on the newly created files and the e

10条回答
  •  不知归路
    2020-11-27 10:47

    Changes work when staged and non-staged with this command. New files work when staged:

    $ git diff HEAD
    

    If they are not staged, you will only see file differences.

提交回复
热议问题