How do I switch a branch in Git?
22:54 12 Jul 2021

I have executed the line below to switch to a new branch created by my teammate:

git checkout with-backend

I'm receiving the error below:

error: pathspec 'with-backend' did not match any file(s) known to git

I tried executing this command:

git branch -a

The with-backend branch created by my teammate is not listed. Below is the result listed:

* main
  remotes/origin/HEAD -> origin/main
  remotes/origin/main
git github github-for-windows