Custom Search

Thursday, July 23, 2015

How to Github fetch a branch from original repo and add to forked repo


I am going to add the branch " R2.1" from original repo https://github.com/JioCloud/contrail-vnc.git to forked repo https://github.com/sajuptpm/contrail-vnc.git

1)
$ git clone https://github.com/sajuptpm/contrail-vnc.git
$ cd contrail-vnc

2)
$ git remote add originalrepo https://github.com/JioCloud/contrail-vnc.git

3)
$ git fetch originalrepo

4)
$ git checkout -b R2.1 --track originalrepo/R2.1

5)
$ git push origin R2.1

6)
Goto github and check for branch "R2.1" in https://github.com/sajuptpm/contrail-vnc.git


No comments:

Post a Comment