To squash commits, you can do the following:
Make sure your branch is up to date with the master branch.
git rebase -i master.
You should see a list of commits, each commit starting with the word "pick".
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.