Skip to content

Instantly share code, notes, and snippets.

@pradel
Created January 26, 2016 09:39
Show Gist options
  • Save pradel/804d55b3f3aef0936ace to your computer and use it in GitHub Desktop.
Save pradel/804d55b3f3aef0936ace to your computer and use it in GitHub Desktop.
How to squash commits
git remote add upstream git://github.com/callemall/material-ui.git # (or url of the repo you want to contribute)
git fetch upstream
git rebase -i HEAD~N # N is the number of commits you want to squash
# Let first commit to pick and pass the others to squash
# pick 1fc6c95 do something
# squash 6b2481b do something else
# squash dd1475d changed some things
# squash c619268 fixing typos
git config --global push.default simple
git push -f origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment