Today I Learned git switch and git restore
Landon Schropp •
One of the tricky things about using Git is that some of the commands have multiple meanings. An example of this is git checkout, which can either switch your branch or restore the previous state of a file.TIL there are two relatively new experimental commands in Git to replace checkout’s functionality
git switch: Switch your current branch.git restore: Restores the contents of the file from a specified source (such asHEAD).
The nice thing about using these commands instead of checkout is that you’ll get better autocompletion.