2 ms·
As long as you commit everything, yes. The reflog is the safety rope of git. Everyone who isn't confident with the reflog should go and learn it right now. Pic
by globular-toast 2y ago
As long as you commit everything, yes. The reflog is the safety rope of git. Everyone who isn't confident with the reflog should go and learn it right now.
Pick your most important repo. Make sure everything is committed. Doing something stupid like `git reset --hard HEAD~100`. Look how fucked your work is. Do `git reset --hard HEAD@{1}`. Look at how nothing was lost.
- everybodyknows 2y ago> reflog should go and learn it Among its other virtues, reflog makes safe the highly empowering 'git-commit --amend'.
- globular-toast 2y agoYep, and even the more powerful fixup workflow where you can essentially amend commits other than HEAD. I do it via git-autofixup: https://github.com/torbiak/git-autofixup https://github.com/torbiak/git-autofixup