git diff只显示目录,而不是所有新文件
如果我有一个存储库,在其中添加新的子目录并对文件进行更改,当我运行git diff只显示目录,而不是所有新文件,git,Git,如果我有一个存储库,在其中添加新的子目录并对文件进行更改,当我运行git status时,我会看到一个摘要 $ git status On branch test Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working
git status
时,我会看到一个摘要
$ git status
On branch test
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: composer.json
modified: composer.lock
modified: vendor/composer/autoload_psr4.php
modified: vendor/composer/autoload_static.php
modified: vendor/composer/installed.json
Untracked files:
(use "git add <file>..." to include in what will be committed)
modules/contrib/a11y_paragraphs_tabs/
vendor/jakubsuchy/
no changes added to commit (use "git add" and/or "git commit -a")
mules/contrib/nasa | 1+
供应商/composer/autoload_psr4.php|1+
供应商/composer/autoload_static.php | 5+
供应商/composer/installed.json | 195+++++++++++++++++++++++++++++++
37 files changed, 1683 insertions(+), 7 deletions(-)
有没有办法对另一个分支执行diff--stat
,该分支看起来就像是git status的输出?换句话说,我希望看到:
$ git diff --stat --summary? master
composer.json | 5 +-
composer.lock | 207 ++++++++++++++++++++++++++++++++-
modules/contrib/a11y_paragraphs_tabs/ | some other stat here indicating files
vendor/composer/autoload_psr4.php | 1 +
vendor/composer/autoload_static.php | 5 +
vendor/composer/installed.json | 195 +++++++++++++++++++++++++++++++
37 files changed, 1683 insertions(+), 7 deletions(-)
也就是说,如果另一个分支不包含该目录,只需列出该目录,而不是它的所有文件和子目录。您可能需要合并:
git diff--stat--summary.
(注意当前文件夹的
)
- 对于其他文件夹
我还没有找到一种方法将两者结合在一个命令中
$ git diff --stat --summary? master
composer.json | 5 +-
composer.lock | 207 ++++++++++++++++++++++++++++++++-
modules/contrib/a11y_paragraphs_tabs/ | some other stat here indicating files
vendor/composer/autoload_psr4.php | 1 +
vendor/composer/autoload_static.php | 5 +
vendor/composer/installed.json | 195 +++++++++++++++++++++++++++++++
37 files changed, 1683 insertions(+), 7 deletions(-)