标签云

微信群

扫码加入我们

WeChat QR Code

This question already has an answer here:

I am asked to take clone of project repository from GitHub server.

There are three branches on server: master, qa and dev.

After taking clone to the project, how can I checkout qa or dev branch as both the branches are not on my local machine?

I tried the command

git checkout qa

it raised an error

$ git checkout qa error: pathspec 'qa' did not match any file(s) known to git.


I edited the question Biffen

2018年08月16日25分55秒

Any Git tutorial will tell you how to switch branch, probably in the first chapter.

2018年08月15日25分55秒

I know to switch a branch, --git checkout branchName, but this is when you have that branch on your local machine.

2018年08月16日25分55秒

Did you try git checkout qa?

2018年08月15日25分55秒

Yes, it doesn't work

2018年08月15日25分55秒

git checkout qa and git checkout dev should suffice.

2018年08月15日25分55秒