Git Switch and Git Restore
git switch and git restore are two relatively new git command to clarify different use cases of git-checkout.
| new | old | functionality |
|---|---|---|
git switch b | git checkout b | switch to a branch |
git restore -- file | git checkout -- file | restore a file from another branch or source |
Additional Cheatsheet
| new | old | functionality |
|---|---|---|
git switch -c new_branch | git checkout -b new_branch | create and switch to a branch |