Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to get rid of the help messages in git status?

Tags:

git

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)

This is some of the output when running git status.

I don't mind the "Changes not staged for commit:" message, but I don't want to see "help" commands about how to "update what will be committed" etc, as they just add a lot of noise.

I know about git status -s, but that's not what I really want.

Is there any way of getting rid of the help messages?

like image 852
noobcoder Avatar asked Aug 23 '16 20:08

noobcoder


People also ask

How do I turn off git hints?

You can set them with git config --global advice. * . For example git config --global advice. statusHints false .

What does the command git status do?

The git status command displays the state of the working directory and the staging area. It lets you see which changes have been staged, which haven't, and which files aren't being tracked by Git.

What does D mean in git?

The -d option is used to delete a git branch from the local machine. Note that -d is a safe option; this means that a branch will not be deleted if its changes have not been merged into the main branch.

What is git status porcelain?

" git status --branch --porcelain " displays the status of the branch (ahead, behind, gone), and used gettext to translate the string. Use hardcoded strings when --porcelain is used, but keep the gettext translation for " git status --short " which is essentially the same, but meant to be read by a human.


1 Answers

In the git-config documentation you can find the variable statusHints of the subsection advice.* which is explained like this:

statusHints

Show directions on how to proceed from the current state in the output of git-status(1), in the template shown when writing commit messages in git-commit(1), and in the help message shown by git-checkout(1) when switching branch.

So I would assume setting

$ git config advice.statusHints off

should get rid of these messages (for the local repository, use --global for all repositories of the current user on this machine)

like image 197
AnimiVulpis Avatar answered Sep 20 '22 03:09

AnimiVulpis