I\'m from a Subversion background and, when I had a branch, I knew what I was working on with \"These working files point to this branch\".
But with Git I\'m not sur
Add it to PS1 using Mac :
PS1
PS1='\W@\u >`[ -d .git ] && git branch | grep ^*|cut -d" " -f2`> $ '
Before running the command above :
After running that command :
Dont worry, if it is not GIT repository , it will not display error because of [-d .git] which checks if .git folder exists or not.
[-d .git]
.git