Skip to content

Instantly share code, notes, and snippets.

@indy
Created Jan 31, 2012
Embed
What would you like to do?
git-unpushed
function git-unpushed {
brinfo=$(git branch -v | grep $(git-branch-name))
if [[ $brinfo =~ ("[ahead "([[:digit:]]*)) ]]
then
echo "(${BASH_REMATCH[2]})"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment