Sunday, January 20, 2013

How to show git branch/status information in bash

extension for terminal/command line to use git more effectively:

For Mac users, (zsh):

For bash(works fine for Ubuntu):
I do following update for /home/USER/.bash/ :
PROMPT_START="$WHITE$Time12a $Yellow$PathShort$ResetColor"

For simple branch show(works very fast), (link second comment):
Simply add following line it ~/.bashrc
PS1='[\u@\h`__git_ps1` \W]\$ '

No comments:

Post a Comment