What happens to original changesets after an Hg “history rewrite” (histedit, commit --amend), and how can they be recovered?
In Git - with it's immutable changeset objects and mutable refs - I know that the original commits remain, which gives me a warm fuzzy feeling after an 'oops' "history rewriting" moment. For example, after a "history rewriting" git rebase the original changesets (cbe7698, 09c6268) are still there and a new changeset (08832c0) was added. I can easily restore/access the other changesets until such a time as they are pruned. $ git log --oneline --graph --decorate $(git rev-list -g --all) * 08832c0 (HEAD -> master) Added bar and quxx to foo.txt | * cbe7698 Added quxx to foo.txt | * 09c6268 Added