You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provides simple information about git repository for the bash terminal
Erik Johnson (xtrementl)
Created: 07-29-2009
Updated: 03-31-2011
Special thanks to:
reborg
The PS1 will be formatted as follows:
Non-Git repo:
[{host}: {dir}] -->
$
Git repo:
[{host}: {dir}] {branch}({diff upstream counts}){working dir syms} [{time last commit}] -->
$
Notes
The marker ($) will be colored red/green depending on the result of last command's exit code
For Git repos, the working dir symbols are:
+ - staged changes
* - unstaged changes
^ - stashed changes
% - untracked files
Installation
Add the following line to your .bashrc:
source ~/.bash_git_ps1.sh