Skip to content

Instantly share code, notes, and snippets.

@marcusshepp
Created July 7, 2016 13:49
Show Gist options
  • Save marcusshepp/d70383cf2b8129b05ed3e312e2c25747 to your computer and use it in GitHub Desktop.
Save marcusshepp/d70383cf2b8129b05ed3e312e2c25747 to your computer and use it in GitHub Desktop.
git rebase
git rebase --interactive HEAD~2 # 2 being the number of commits you wish to use
# should see commits listed:
# pick <foo bar pop>
# pick <foo2 ba2r pop2>
# change the commits that should squash to `s` instead of pick:
# pick <foo bar pop>
# s <foo2 ba2r pop2>
# save quit
# save quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment