timshadel (owner)

Fork Of

Revisions

gist: 54227 Download_button fork
public
Description:
Use git-symbolic-ref instead of git-branch for showing current branch on the commandline
Public Clone URL: git://gist.github.com/54227.git
Embed All Files: show embed
.bashrc #
1
2
3
4
5
parse_git_branch() {
  git symbolic-ref HEAD 2> /dev/null | cut -d/ -f3- | sed -e 's/\(.*\)/ (\1)/'
}
PS1="\w\$(parse_git_branch) $ "