ITADN

Oh shit I want to roll back a bunch of commits without deleting them

#156Openthedjdoorn 创建于 2023-06-08
T
thedjdoorncommented
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.
0 条评论