4 ms·
> git is dangerous out of the box - it can destroy your work very easily I really wonder what do you mean by that? Yes, it's relatively easy to checkout some
by sampo 13y ago
> git is dangerous out of the box - it can destroy your work very easily
I really wonder what do you mean by that?
Yes, it's relatively easy to checkout some older commit and end up in a headless state, where an ordinary `git log` command won't show your more recent commits. And then panic and think that git has destroyed your work. But all your commits are still there. You need some more involved way (like the reflog) to get back to them, but git has not destroyed them.
After 30 days or so, git may run garbage collection and remove dangling commits, thus really destroying your work then. But your words "can destroy your work very easily" are a bit strong if this is what you mean?
- jheriko 13y agoI chose words that were too strong. The core of my problem is the amount of learning and configuration required to revert a merge. Its too much. The poor choice of defaults and requirement that I fiddle with implementation details shakes my confidence in the whole of git. I'm sure its aslwasys eventually recoverable but that's far away from practical to me vs just using mercurial which I find easy to use and has sensible defaults