A union of curiosity and data science

Knowledgebase and brain dump of a database engineer


command shell git branch display

ubuntu: 

parse_git_branch() {
    git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
}
export PS1=$PS1'$(parse_git_branch) '



Add comment