• Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    46
    ·
    29 days ago

    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 switch and the unsafe with git restore.