Hacker News new | ask | show | jobs
by chx 946 days ago
No need for hard concepts.

I am talking of things like "opsie, I don't want to commit this yet" (git reset) and "destroy all my work" (git reset --hard) being a command line switch apart. That's just wrong. That's so wrong I keep git reset --hard safety net around, in fact. https://gist.github.com/chx/85db0ebed1e02ab14b1a65b6024dea29

1 comments

Kind of like how “hg update” becomes “destroy all my work” with -C? At some point you do need to learn what things to be careful about. Git’s reflog will avoid most forms of data loss but uncommitted/staged changes are a harder problem than it might seem.