While trying to sort out bugs with apps on Heroku, I usually end up with a bunch of Git commits related to the bug fixing process, as I need to commit the updates in order t
You don't really want to clean up these commits. What you want to do instead is encapsulate them in a merge commit:
git checkout mastergit checkout -b my-cool-bugfixgit checkout master again, then do a non-fast-forward merge. This is essential: forcing non-fast-forward with the --no-ff option means that a merge commit will always be created. In this case, the command would be git merge --no-ff my-cool-bugfix.git push heroku.