2 ms·
several people I know, including guys very proficient in Git, have complained about "git ate two days worth of my work!" It is easy to make errors in rebasing a
by gruseom 15y ago
several people I know, including guys very proficient in Git, have complained about "git ate two days worth of my work!" It is easy to make errors in rebasing and reset --hard, and you may end up losing commits.
Something seems wrong there. How do you lose commits? They're all in the reflog. The only way I can see git "eating" work is if the work hadn't been committed in the first place and they overwrote it - in which case it's not so much "git ate my work" as "I deleted it".
It's true that it's easy to make errors with rebase and reset, but it's just as easy to correct them. That's the beauty of it: commits are so malleable that they become part of interactive hacking. One gains a new axis along which to store information and move it around and rework it (comparable to a bunch of new registers magically appearing in a machine). For me the most interesting consequences don't have to do with version control so much as with how I craft programs in general. Biggest win since the REPL.