Skip to content

Instantly share code, notes, and snippets.

@kaiomagalhaes
Last active April 16, 2020 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaiomagalhaes/15ca5b45754e8a51c6b0032d0e287aa5 to your computer and use it in GitHub Desktop.
Save kaiomagalhaes/15ca5b45754e8a51c6b0032d0e287aa5 to your computer and use it in GitHub Desktop.
When submitting a pull request to, we ask that you squash your commits before we merge. Assuming that you are in a branch different from develop.
In your terminal, do the following:
Make sure your branch is up to date with the develop branch.
1. git pull origin develop --rebase
Start the rebase
2. git rebase -i develop.
You should see a list of commits, each commit starting with the word "pick".
3. Make sure the first commit says "pick" and change the rest from "pick" to "squash". -- This will squash each commit into the previous commit, which will continue until every commit is squashed into the first commit.
Save and close the editor.
It will pop up another window to give you the opportunity to change the commit message.
Save and close the editor again.
Then you have to force push the final, squashed commit: git push --force.
Squashing commits can be a tricky process but once you figure it out, it's really helpful and keeps our repo concise and clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment