Friday, March 6, 2015

Pulling your co-worker forked remote branch

> git remote add coworker
> git fetch coworker
> git checkout --track coworker/foo

This will setup a local branch foo, tracking the remote branch coworker/foo. So when your coworker has made some changes, you can easily pull them.

> git pull
> git checkout foo

This will pull the latest changes. This is especially required when you wanted to pull the code and review it directly without really disturbing own repo. This will avoid setting up one more repository as well.

No comments:

Post a Comment