Synopsis
git checkout [<branch>]
git checkout -b <new-branch> [<start-point>]
git checkout [<tree-ish>] -- <file>...
Description
The git checkout command historically does two unrelated things: switching branches and restoring files. Because of this overload, modern Git introduced git switch for branch operations and git restore for file operations. git checkout still works and remains popular, but new users are encouraged to learn the newer split commands.