I think the easiest way to do this is by making a new branch off of master and doing a merge --squash of the feature branch.

    git checkout master
    git checkout -b feature_branch_squashed
    git merge --squash feature_branch

Then you have all of the changes ready to commit.