top | item 46599056

(no title)

codesnik | 1 month ago

whoa. well, if it really works for you. The thing is, git has practically zero "destructive" commands, you almost always (unless you called garbage collector aggressively) return to the previous state of anything committed to it. `git reflog` is a good starting point.

I think i've seen someone coded user-friendlier `git undo` front for it.

discuss

order

embedding-shape|1 month ago

I expanded on it more here: https://news.ycombinator.com/item?id=46601600

TDLR is: people feel safer when they can see that their original work is safe, while just making a new branch and playing around there is safe in 99% of the cases, people are more willing to experiment when you isolate what they want to keep.

g-b-r|1 month ago

Except that with this article's advice (delete the repository and clone it again) the reflog and the unreachable commits get lost all the time