Switch to a remote github branch or fork


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  1. # add reference to remote branch 'foo'
  2. git remote add foo git://github.com/foo/project.git
  3.  
  4. # add branch based on reference (-b) and change to it (checkout)
  5. git checkout -b foo/master
  6.  
  7. # confirm that foo/master is active
  8. git branch
  9.  
  10. # pull branch
  11. git pull foo master

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.