git - How can I push a branch into a separate remote repo? -


i have local repo a, 1 branch (master) , remote repo b. each of repos has own history.

i want push repo a's master branch new branch called branch1 in repo b. how can that?

if want push master branch on (local) repo a new branch called branch1 on (remote) repo b, need to

  1. make sure b listed remote repository repository @ at correc url: while within repo a, run

    git remote -v 

    if don't see url corresponding repo b in list, need add repo b remote repository a, using

    git remote add <remote-name> <url> 

    in following, i'll assume repository b listed remote repo under remote name repob.

  2. do push: while within repo a, run

    git push repob master:branch1 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -