- Pro Git book - free online book about git written by Scott Chacon and Ben Straub
Before trying to check out the branch your co-worker has asked you to look at run git pull.
This will make sure that when you checkout the branch if it is linked to the remote one.
Now you are ready to check out the branch
git checkout branch_name
You can now make your changes or look at the code
If you get the following error
error: pathspec 'branch_name' did not match any file(s) known to git.
Then you didn't pull, or you got the branch name wrong.
git pull and try again or confirm the branch name.