It totally depends upon the exact git command being used.
Let’s say, if you check out an un-fetched branch from your remote repo, then
Try first git fetch
After that git checkout yourBranch: if origin/yourBranch is still there, it will definitely work.
While checking out a file, pay attention towards case: it can be case-sensitive as well.
If you are unable to checkout .fatal: Then you are on a branch that is not born yet.
Please make sure you have added and right after that make one commit.
git add. git commit -m "first commit"
If you want to get more insights into SQL, check out this SQL Course from Intellipaat.