The git checkout command can be used to download one or more files from the origin Git repository to a directory on your local PC. Similarly, the git pull and git fetch commands can be used to clone files in an origin repository to your local branch (master). In this example, foo.txt will be cloned from the origin Git repository to your branch.
git checkout 'path/to/foo.txt'
The git checkout command can also be used to switch to another branch.
git checkout feat/logging
Which should return something like this.
Switched to a new branch 'feat/logging'