Undoing is neat, but can I “redo” if I screw up? 😨

We’ve seen pretty much all the common scenarios for git reset. Still, working with reset can feel stressful if we’re not assured to be able to “rollback” a reset. Typos, erroneous parameter order… many things can end up wrecking havoc in our repo despite our best intentions. Fortunately, Git is designed from the ground up for maximum safety, so that we can feel free to experiment. So let’s gain confidence by exploring how we can redo after undo!
Undoing is neat, but can I “redo” if I screw up? 😨
Sure you can: the reflog remembers what you forgot
3 mins
Log vs Reflog
1 min
How is our reflog built from the HEAD?
6 mins
How is our reflog built from branch tips?
3 mins
So I can never lose anything, right?
1 min
reflog + reset: back to the future
2 mins