Skip to content

Instantly share code, notes, and snippets.

@stim371
Created June 12, 2014 21:10
Show Gist options
  • Save stim371/b8b22227f5af88abf6eb to your computer and use it in GitHub Desktop.
Save stim371/b8b22227f5af88abf6eb to your computer and use it in GitHub Desktop.
console function to tell you how many commits you need to roll back to get to a branch
function gitto() {
git diff $1 --name-status | grep -c "^[AM].*migrate"
COMPREPLY=($(git branch))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment