The docs say:
All changes made by commits in the current branch but that are not in <upstream> are saved to a temporary area. This is the same set of commits that would be shown by git log <upstream>..HEAD
Cleaner history makes life much easier for those who will try to understand what you did weeks or months or even years later (including your future self).
Of course, you shouldn't (with rare exceptions) edit history you have already shared with others; but, I never found that concept, or the way git implements it, particularly hard to understand. (I will admit some of git's commands are hard to remember - I am always forgetting the difference between "git reset --hard" and "git reset --soft".)
Recorded history is not necessarily what actually happened though, often (or always, according to some) it's an interpretation.
"History is written by the victors" - Walter Benjamin?
Funny, I think the biggest problem is people who refuse to understand the caveats of rewriting shared history and spread FUD about it.
See, I fundamentally disagree that this is what I wanted. When I merge my thing with change x into head I expect to see my changes actually go in. Not to see commits retroactively added to head. The merge was the action, not some weird rewriting of historical order of events.
> The biggest trick to understanding git is to learn to think in commits rather than file content.
Ok, I'm starting to see what you meant. (I didn't understand this until the second part and my being confused as heck)
It's better to accept history as it is, and fix the problem with reverts, cherry-picking and new commits. History won't be as pretty or clean, but it will reflect what actually happened, which is what history is, after all.
The biggest trick to understanding git is to learn to think in commits rather than file content. If one branch has a commit and the other branch doesn't, merging them will mean that the commit is there. If one branch has the commit while the other branch has the commit and a revert for that commit, merging will mean it will be reverted.
Same goes with pushing. If you reset locally to before a commit that you already shared, that commit returns on your next pull. If you revert it, it will stay reverted.
The most dangerous thing git can do, is rebasing. Rebase changes history. This is fine if it hasn't been shared yet (you commited a new change and try to push, but remote changes need to be pulled first, so rebasing is fine). Rebasing is not fine if the commit has already been shared, through a different branch or a different remote repository, for example. In that case, you need a merge.
As pretty as rebase can make your history, you should really only use it when you understand what it does. If you don't, stick with merge.