Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
Xurinos
· 14y ago · 0 comments
It becomes dangerous if you have changes in your working tree. You truly lose those changes with a "git reset --hard HEAD" or the forced checkout.
Comments
[–]
davvid
14y ago
Exactly. As mentioned in the article, `git reset --keep` is the preferred way to do it these days. It preserves uncommitted worktree changes.
[–]
billybob
14y ago
Oh! I see. I would never do a `git reset` of any kind if I hadn't committed or stashed. Yikes!