Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
sleepychu
· 10y ago · 0 comments
Came here for this. git undo won't restore the changes wiped out by reset --hard? They aren't stored on the reflog?
Comments
[–]
panic
10y ago
If it hasn't been committed, it won't be in the reflog. Working copies and stashed changes are especially vulnerable to being overwritten by accident. It would be great if git had a way to undo these operations too.
[–]
OJFord
10y ago
You could alias reset to instead commit all and then reset.
[–]
panic
10y ago
But what if I'm just trying to unstage something? I don't think shell aliases can solve this in the general case.