by black-tea · 7y ago · 0 comments
It's also very important to learn to use the reflog. When I was learning to climb they told me I'd never get really good until I'd fallen once. The same thing goes for git. People are really scared of it because they think they could lose work or something. Thanks to the reflog and the way git works, that's actually quite difficult to do.
Git will garbage collect these commits that can't be reached by any reference after a while, but usually that's long after you've forgotten they ever existed.