Remote branches


#1

Hey all

I’m doing something wrong here where I can’t checkout a branch that i pulled from the remote
the remote branch is called floatOutput and exists on another machine and github

  
  
kimchips@CHUO /c/openFrameworks/openFrameworks/apps/MapTools-SL (OpenCV)  
$ git branch -v  
* OpenCV 6f45409 [ahead 6] move from laptop  
  master 2a83f9a double visualise  
  
kimchips@CHUO /c/openFrameworks/openFrameworks/apps/MapTools-SL (OpenCV)  
$ git pull origin floatOutput  
From github.com:elliotwoods/MapTools-SL  
 * branch            floatOutput -> FETCH_HEAD  
Already up-to-date.  
  
kimchips@CHUO /c/openFrameworks/openFrameworks/apps/MapTools-SL (OpenCV)  
$ git fetch origin floatOutput  
From github.com:elliotwoods/MapTools-SL  
 * branch            floatOutput -> FETCH_HEAD  
  
kimchips@CHUO /c/openFrameworks/openFrameworks/apps/MapTools-SL (OpenCV)  
$ git branch -v  
* OpenCV 6f45409 [ahead 6] move from laptop  
  master 2a83f9a double visualise  
  


#2

when you do:

  
git pull origin floatOutput  

you are pulling the contents of origin/floatOutput into the current branch (into OpenCv) so now you have whatever you had in OpenCv + the changes in floatOutput.

what you want to do is to checkout a branch:

  
  
git fetch origin floatOutput   
git checkout -torigin/floatOutput -bfloatOutput  
  

with most newer versions of git the -t parameter is not necessary