With a checkout, you can
Specifically, it will check out the files
Checking out a local branch from a remote-tracking branch automatically creates what is called a tracking branch
git checkout branchName
Restore the Makefile to two revisions back from the main branch
git checkout main~2 Makefile
For all unstaged files use at the root dir:
git checkout -- .
git checkout path/to/file
git checkout main -- {path/to/dir,path/to/dir2,path/to/file.json}
Do you perform the checkout from the root directory ?