I'm using git in the terminal and know most of the commands I need by heart. Therefore I would like to suppress the "help hints" in the output, i.e. all the text in parenthesis starting with (use "git ...
) to make the output less verbose.
I know of the flags --short
and --porcelain
, but then the output is less readable on a quick glance IMHO.
Is there a way to keep the default formatting of the output but without the help text?
Example:
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
... instead of ...
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")
By using the -a flag when committing you are telling Git to add all files that have been modified and then commit them.
Finally, GIT_SSH_COMMAND means Git 2.10+, so if your version of Git is too old, you will need to update it first. Follow this answer to receive notifications. answered Feb 20, 2018 at 5:37. VonC.
Git offered enabling/disabling advice by using the 'advice.*' key in the configuration. See git help config
for more information. The following 14 variables exist:
advice.pushUpdateRejected
advice.pushNonFFCurrent
advice.pushNonFFMatching
advice.pushAlreadyExists
advice.pushFetchFirst
advice.pushNeedsForce
advice.statusHints
advice.statusUoption
advice.commitBeforeMerge
advice.resolveConflict
advice.implicitIdentity
advice.detachedHead
advice.amWorkDir
advice.rmHints
You can set them with git config --global advice.*
. For example git config --global advice.statusHints false
. Note that I have not seen a way to disable all the same time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With