Bash git prompt

Change prompt when current folder is in git repository
Installation:

$ cd ~
$ git clone https://github.com/magicmonty/bash-git-prompt.git .bash-git-prompt --depth=1

Add to the ~/.bashrc

$ vi ~/.bashrc
...
GIT_PROMPT_ONLY_IN_REPO=1
source ~/.bash-git-prompt/gitprompt.sh

Reference: https://github.com/magicmonty/bash-git-prompt

Leave a Reply

Your email address will not be published. Required fields are marked *