Written by dustbringer on 27 November 2021 . View source.
git-prompt.sh
Allows you to see repository status in your command prompt.
The script can be found here.
This can be 'installed' as follows:
source path/to/git-prompt.sh
at the end of ~/.bashrc
To add git repo information to your bash prompt:
$ echo $PS1
$(__git_ps1 " (%s)")
somewhere in itexport PS1=YOUR_EDITED_LAYOUT
at the end of ~/.bashrc
bash: __git_ps1: command not found
, then make sure that the git-prompt.sh
is run properlySource: https://stackoverflow.com/questions/21140815/how-do-i-modify-cygwins-ps1-for-git-bash-completion