Linus Torvalds writes:
What happened today was that I had been doing a pull or two, and then
applied an emailed patch with "git am" as usual. But as sometimes
happens, I actually had a previous "git am" that had failed - in fact,
it was the same patch that I applied today that had had an earlier
version that no longer applied.
It would be helpful if "git status" mentioned if a rebase or am operation is in
progress... this might have helped you avoid the situation described.