Skip to content

Instantly share code, notes, and snippets.

@tmikoss
Created December 12, 2012 07:56
Show Gist options
  • Save tmikoss/4265939 to your computer and use it in GitHub Desktop.
Save tmikoss/4265939 to your computer and use it in GitHub Desktop.
Capistrano: work with current branch
function git-current-branch {
git branch 2>/dev/null | grep -e '^*' | sed -E 's/^\* (.+)$/\1 /'
}
function cap-current {
cap -s branch=git-current-branch $*
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment