When submitting a pull request, it's important that you squash your commits to keep our repository concise and clean.
You will need to use VIM to do this.
Make sure your branch is up to date with the master branch.
- Run
git rebase -i master
. - VIM will be opened
- You should see a list of commits, each commit starting with the word "pick".
- Press
i
ors
on the console -- This will bring you to insert/edit mode of VIM - 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 by pressing
Esc
and type:wq
. - It will give you the opportunity to change the commit message.
- Press
i
ors
to edit - Non-commented lines will appear as commit messages. Commented lines (preceded with #) will not appear on the commit message.
- Save and close the editor again by pressing
Esc
and type:wq
. - Then you have to force push the final, squashed commit:
git push -f
.