2 ms·
> You must do something drastic like git reset --hard to revert that rebase This betrays a deep failure to understand git; `git reset --hard` is one of the le
by unanswered 5y ago
> You must do something drastic like git reset --hard to revert that rebase
This betrays a deep failure to understand git; `git reset --hard` is one of the least "drastic" things you can do to a repository. It's certainly a lot less drastic than `git commit`, because it does a subset of the things `git commit` does. All `git reset --hard` does (to the repo, I mean; it also has working tree effects in yet another example of bad git UX) is point a branch to a different commit. `git checkout -B` is another way to accomplish the same thing, as is `git branch -f` (did I mention the bad UX?).