sca*_*arf 5 git git-diff diffstat
我希望 git status 也列出更改的行数,\n就像那些+和:-git pull
例子)
\n\xe2\x9d\xaf LANG=c git status\nOn branch develop\nYour branch is up to date with \'upstream/develop\'.\n\nChanges not staged for commit:\n (use "git add <file>..." to update what will be committed)\n (use "git restore <file>..." to discard changes in working directory)\n modified: package-lock.json | 1093 ++++++++---\n modified: package.json | 26 +++---\nRun Code Online (Sandbox Code Playgroud)\n因为我在文档中找不到这样的选项,所以我尝试使用diffstat,因为它用于git pull。
\xe2\x9d\xaf git diff | diffstat -C\n package-lock.json | 1093 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------\n package.json | 26 +-\n 2 files changed, 915 insertions(+), 204 deletions(-)\nRun Code Online (Sandbox Code Playgroud)\n但是有两个问题:
\n使用大量 bash 可以修复 1,但我不确定如何在不修改索引的情况下完成 2。
\n