Skip to content

Instantly share code, notes, and snippets.

View jasantoro's full-sized avatar

Jorge Santoro jasantoro

View GitHub Profile
@jproyo
jproyo / git_bash
Created May 7, 2012 20:43
Git Bash prompt improvement
#!/bin/bash
#function parse_git_branch {
# ref=$(git-symbolic-ref HEAD 2> /dev/null) || return
# echo "("${ref#refs/heads/}")"
#}
function parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}