I have two separate git repositories. One is mine, and has “Branch A”, the other was developed by someone else and has “Branch B”. They both have the same master branch.
How do I import his branch inside my git repository? So I want the result to be:
$ git branch
- Branch A
Branch B
master
First, start tracking the remote repository:
Fetch the latest data:
And then checkout the remote branch you want into a new branch of your own: