How to configure git status message so as not to reference git push?

git status reports:

# On branch master 
# Your branch is ahead of 'origin/master' by 1 commit. 
# (use "git push" to publish your local commits)

Is there a configuration file or some other way to override this message? Especially remove the "git push" link? I do not want people to use "git push", but to use another tool.

+4
source share
1 answer

See if this works:

git config advice.statusHints false

Addressing your comment about whether it is possible to print some messages, but not others:

. , git. (advice_status_hints) , . git - git, .
, git .bashrc:

git() {
    if [[ $1 == "status" ]];
    then
        command git "$@" | sed '/# (use "git push" to publish your local commits)/d'
    else
        command git "$@";
    fi;
}

, , , git status.

+2

All Articles