Let's be fair: nobody uses revert for fun, and reset is a landmine if used incorrectly. You don't need them anyway, since we have:
git checkout *hash* .
Which resets all files to the status of that commit. Combine with git clean -df to remove any file or directory that wasn't being tracked at the time. Run a new git commit and boom, back to work. Nothing (of value) was lost.
Let's be fair: nobody uses
revertfor fun, andresetis a landmine if used incorrectly. You don't need them anyway, since we have:git checkout *hash* .Which resets all files to the status of that commit. Combine with
git clean -dfto remove any file or directory that wasn't being tracked at the time. Run a newgit commitand boom, back to work. Nothing (of value) was lost.