I am new to Github and i have a question that i have been trying to find an answer.
Say i have three repositories, Origin, Repo1 (my repo - forked from Origin), Repo2 (my colleague's repo forked from Origin).
We work on our own repos, and then make pull requests to origin.
How can I clone my colleague's repo2/branch1 into my local repo? If i use git pull, it merges my local branch into repo2/branch1. What i want is to create a new branch in my local repo which contains exactly and only what is in repo2/branch1. Is there a command to do that ?
What i have to do now everytime i want to do something similar is "CLONE" the whole repo2 which is time consuming and problematic.
Thanks very much.
UPDATE ANSWER
git fetch repo2
git checkout -b repo2_branch1 repo2/branch1
will remote track branch1 of repo2 on my local machine as a branch called repo2_branch1.