I'm not experienced with git. I cloned a master branch of a project via git clone --link--
and now in my git bash window I see: /c/app/project (master)
so I'm in the master. Now I want to switch to an existing branch (say test) and do a pull to get the latest changes. When I type git checkout test
I get error: "error: pathspec 'test' did not match any file(s) known to git.
how can I switch the branch
(since this was marked as duplicate, I checked the supposed answer and that did not solve my problem. It seems that I'm unable to move out of the master branch of my project)
You should get familiar first with basic git. This is one of the possible resource which you can print and put beside your workstation.
You can use
git fetch
if you want to just get remote branches
or you can use
git pull
to sync the local with remote branches
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.