4 ms·
There is a design to address undoing changes to the index: https://github.com/arxanas/git-branchless/issues/10 https://github.com/arxanas/git-branchless/issues/
by arxanas 5y ago
There is a design to address undoing changes to the index: https://github.com/arxanas/git-branchless/issues/10 https://github.com/arxanas/git-branchless/issues/10
It runs a `git checkout`, not a `git reset --hard`, so it will stop you if there are incompatible changes. Of course, if `git undo` can be made to lose your staged or unstaged work, then that's a bug.
Fortunately, you can undo the result of any `git undo` with another `git undo` that goes one more step back in time.