Skip to content

Instantly share code, notes, and snippets.

View knaveofdiamonds's full-sized avatar

Roland Swingler knaveofdiamonds

View GitHub Profile
# with this function defined...
__git_branch ()
{
local b="$(git symbolic-ref HEAD 2>/dev/null)"
if [ -n "$b" ]; then
printf "%s" "${b##refs/heads/}"
fi
}
# this gives you warnings for files changed in your branch