DEV Community

Discussion on: The git command that will change your life! Don't have those git nightmares 😰 anymore.

Collapse
 
amartinno1 profile image
Alex Nostadt

It's good to know, thus I believe once git's garbage collection run it ain't work anymore, does it? Don't get me wrong, it's not a hate comment 😉

Collapse
 
guneyozsan profile image
Guney Ozsan

Exactly. It is not a Back to the Future feature but pretty reliable to get you out of one of those OMG what have I done moments.

Collapse
 
victoryarema profile image
Victor Yarema

The trick is that git gc preserves all commits of all reflogs.