Command
Explanation
git checkout is used to switch branches or restore files. It switches branches or restores files.
Examples
Switch to main branch
Create and switch to new branch
Discard changes to file
git checkout is used to switch branches or restore files. It switches branches or restores files.
Switch to main branch
Create and switch to new branch
Discard changes to file