3 ms·
Remember, it's all immutable data structures. So whatever you do locally (i.e. apart from git push), the old version is still there - git reflog will show it.
by 6ren 13y ago
Remember, it's all immutable data structures. So whatever you do locally (i.e. apart from git push), the old version is still there - git reflog will show it.
Git eventually garbage collects old versions (i.e. not accessible from a branch), but by default only after a month.
Unfortunately... using git reflog to find the old version and undo a command itself has a learning curve. :\
- jordanthoms 13y agoThis for me is the one feature of git that I could never give up. The confidence that, once a state has entered my history, I can always get it back is really helpful when playing with things.