我在终端中使用git并且已经熟记了大部分需要的命令。因此,我希望抑制输出中的“帮助提示”,即以(use "git ...
开头的括号中的所有文本,以使输出更简洁。
我知道--short
和--porcelain
这两个标志,但我认为这样输出的可读性会降低。
有没有一种方法保持默认格式的输出但没有帮助文本呢?
示例:
git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
Changes not staged for commit:
modified: file1.txt
modified: file2.txt
Untracked files:
untracked_file.txt
no changes added to commit
...而不是...
git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
modified: file1.txt
modified: file2.txt
Untracked files:
(use "git add ..." to include in what will be committed)
untracked_file.txt
no changes added to commit (use "git add" and/or "git commit -a")
git config --global status.hints false
是否有效。 - Lasse V. Karlsengit config --global advice.statusHints false
,它起作用了。 - jost21