Skip to content

Instantly share code, notes, and snippets.

@davglass
Created June 16, 2014 14:29
Show Gist options
  • Save davglass/838ae7bb5e1d48bc4e8f to your computer and use it in GitHub Desktop.
Save davglass/838ae7bb5e1d48bc4e8f to your computer and use it in GitHub Desktop.
Place this file in your path and you get: git squash {2..n}
#!/bin/bash
level=$1
if [ "${level}" == "" ]; then
level=2
fi
git rebase --interactive HEAD~${level}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment