Resources for the TIY-Durham Rails course.
Undo Working Directory:
git stashgit checkout -- . or git checkout .git reset --hardUndo Add:
git reset --hard (or --mixed, depending on whether you want to wipe out the working directory as well)Undo Commit:
git reset --hard HEAD~1 (or --mixed or --soft, depending on whether you want to wipe out the staging and working directories as well)git revertUndo Push:
git revert, then git pushgit filter-branch ...