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
  4. # add branch based on reference (-b) and change to it (checkout)
  5. git checkout -b foo/master
  7. # confirm that foo/master is active
  8. git branch
  10. # pull branch
  11. git pull foo master

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.