Skip to content

GitPrompt#

Install#

  • Clone repo:
    1
    git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1
    
  • Add into ~/.bashrc:
    1
    2
    3
    4
    if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
        GIT_PROMPT_ONLY_IN_REPO=1
        source $HOME/.bash-git-prompt/gitprompt.sh
    fi