Hi there 👋
Hi, I’m Vincent. I’ve worked on engineering teams big and small, across food, finance, healthcare, and more. I write here about things I’ve learned—and things I’m still figuring out.
I originally posted this in Octopress on Dec 11th 2014. Sometimes it’s handy to always see which branch of the repository we’re working in. We can display this as part of the terminal command prompt by adding a few things to our local ~/.bash_profile file. 1# Filename: ~/.bash_profile 2function parse_git_branch { 3 git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' 4} 5# This will display the current folder's full path. 6# If you want only the folder name, replace \w with \W 7export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\[\033[36m\]\$(parse_git_branch)\[\033[0m\]\$ " And just for posterity, here’s a snapshot of the original site: ...