为什么git diff无法处理子目录中的更改?
当我执行git diff *c
并且C
文件位于子目录中时,git会输出错误消息。
$ git diff *c
fatal: ambiguous argument '*c': unknown revision or path not in the
working tree. Use '--' to separate paths from revisions, like
this: 'git <command> [<revision>...] -- [<file>...]'
使用git diff来列出子目录中的更改需要什么选项?
答案 0 :(得分:1)
看起来命令缺少引号而且它们不是可选的:
$ git diff -- '*.c'