link
Switch branches or restore files
git checkout
Switch to main branch
git checkout main
Create and switch to new branch
git checkout -b new-branch
Discard changes to file
git checkout file.txt