What actually happened here is that the working tree got clobbered. That is a vastly less problematic situation. Working trees get clobbered all the time: rogue "make clean" changes, system crashes, someone-stole-my-laptop, errant rm -rf, forgetting which tree your changes are in... I've lost working data to every one of these, and I never felt the need to blame my tools in a blog post.
So yeah. It's a bug (and a pretty embarassing one). It was fixed. Is there anything more to say? Move along.
"All software has bugs, but bugs that destroy data are pretty devastating." It's hard not to agree with this...
git fetch
git stash
git pull --rebase branch-name
git stash apply
All this cp business struck me as a bit of not understanding how to properly work with git. I've never had my work clobbered by following the strategy above. But I also don't go very long between commits on my working branch.git pull --rebase branch-name
I personally do a "real" commit before rebase, but "git stash" is really the exact same thing. I guess "git stash pop" is less scary than "git rebase HEAD^". Either way, you can always undo that operation via the reflog.
This behavior should be stomped out in first year as a mandatory course, right along CPR.
It's still not cool to clobber work like that.