I issued the following pull to our GitHub repo…
L.MVC4 (master *)$ git pull
remote: Counting objects: 59, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 36 (delta 29), reused 34 (delta 27)
Unpacking objects: 100% (36/36), done.
From https://github.com/CM/L.MVC4
b002a02..82deccf master -> origin/master
e690bc3..d23f567 koprod3 -> origin/koprod3
* [new branch] koprod4 -> origin/koprod4
Updating b002a02..82deccf
… and noticed 2 branches (koprod3, koprod4) from a coworker he checked in were pulled. However, when I do a git branch I only get my branches…
L.MVC4 (master *)$ git branch
* master
newbranch
seeddata
So how do I gain access to his branches. It appears they have already been pulled?
These are remote branches. To see them, either run
git branch -r(only show remote branches) orgit branch -a(show all branches).To check them out, use
git checkout -b koprod3 origin/koprod3(newer versions of Git also allow justgit checkout koprod3). To create a local branch at the commit they are currently pointing to, issue the commandgit branch koprod3 origin/koprod3.Of course, the name for your local branch can be anything and must not be identical to the remote name.