you are viewing a single comment's thread
view the rest of the comments
[–] 42 points 11 months ago (2 children)

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.

  • source
  • hideshow 2 child comments