When I squash commits in a branch (using git rebase -i), I'm always annoyed that the squashed commit is combined with the older commit instead of the newer commit.
I don't understand why it was designed this way. When I commit a work in progress (WIP), it represents code that doesn't compile or isn't finished. When I finally commit the "it finally works!" commit and squash before merging, it makes far more sense for these WIP commits to be combined into the "it finally works!" commit, instead of being combined with the previous commit. Squashing a WIP essentially 'breaks' the previous commit with code that I know doesn't compile.
To get around this, my workflow is to squash the commits from "it works!" all the way back to one before the first WIP commit. But isn't this silly? What are other people doing, that makes squashing a WIP to a previous commit make sense?
git merge -i --update-refs
option? – Schizopod