The checkout command is used in Git to:
- switch to an arbitrary existing branch (git checkout branch-name)
- create a new branch from the current one (git checkout -b new-branch-name)
- switch to a branch from a remote repository (git checkout -b branch-name origin/branch-name)