Skip to content

Instantly share code, notes, and snippets.

@johnreilly
Created October 29, 2008 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save johnreilly/20626 to your computer and use it in GitHub Desktop.
Save johnreilly/20626 to your computer and use it in GitHub Desktop.
# Say we're both working on the same project, and I've just created
# a new branch for my cool new feature and pushed it up to my
# github-hosted repo on a branch called "feature".
# Inside your local copy of the repo:
# create a new remote called "johnreilly" for the repo located at github
git remote add johnreilly git://github.com/johnreilly/project.git
# create and checkout a new tracking branch based on mine
git checkout --track -b johns_feature johnreilly/feature
# you should now have a local branch called "johns_feature" that tracks
# my feature branch. Doing a "git pull" will pull in any of my changes.
# You can merge that branch into any of your other local branches.
### At least, i think it will. I've been working for a while, brain is starting to fry...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment