284
When you have to checkout the master branch
(lemmy.world)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
it has always bothered me that checkout is overloaded: it can switch branches or discard pending changes in an unrecoverable way.
so, PSA, you can replicate the safe part of checkout with
git switchand the unsafe withgit restore.Ah, I love coherent software.
Switch and restore came later because checkout was problematic.
Just alias stuff like that, make it coherent.