3 ms·
The best refactor is the one you accidentally commit using the smooth, virtuoso commit command only for masters of the art, "git reset --hard". Fingers have a
by jlokier 5y ago
The best refactor is the one you accidentally commit using the smooth, virtuoso commit command only for masters of the art, "git reset --hard". Fingers have a mind of their own sometimes.
(Next was something to snapshot the VM, followed by "apt-get install ext4magic". It worked!)
- bqmjjx0kac 5y agoIs `git reset --hard` not undoable with `git reflog` and another `git reset --hard`?
- jlokier 5y agoNo, it wipes all local changes to tracked files in your worktree that haven't been committed yet.
- nerdponx 5y agoI really wish it would warn you with a y/n prompt before doing this. Same with `git checkout` when overwriting unsaved files. You should need a `--force` option to bypass the prompt. Or it could simply refuse to make the change without `--force`.