3 ms·
git reset --hard These days there's little reason to do reset --hard. `git reset --merge` is much safer and can be used almost anytime you would have otherwise
by davvid 12y ago
git reset --hard
These days there's little reason to do reset --hard. `git reset --merge` is much safer and can be used almost anytime you would have otherwise done `--hard`.
e.g. if you want to force your branch to point at "foo", you can `git reset --merge foo` and it'll bail out if it detects that you have uncommitted edits that would have been lost by moving to "foo". If it can safely move the uncommitted edits there, it'll do it.