origin: https://github.com/appleboy/git-test
remote: https://github.com/appleboy/html5-template-engine
# clone origin repo
$ git clone https://github.com/appleboy/git-test
$ cd git-test
# add remote repo url.
$ git remote add html5 https://github.com/appleboy/html5-template-engine.git
show all remote repo
$ git remote -v
html5 https://github.com/appleboy/html5-template-engine.git (fetch)
html5 https://github.com/appleboy/html5-template-engine.git (push)
origin [email protected]:appleboy/git-test.git (fetch)
origin [email protected]:appleboy/git-test.git (push)
fetch remote repo data
$ git fetch html5
show all branch info
$ git branch -a
* master 420f7f5 update test.php
remotes/html5/master b6e0324 update html
remotes/origin/HEAD -> origin/master
remotes/origin/master 420f7f5 update test.php
copy html5/master branch to origin repo
$ git checkout -b html5/develop html5/master
show all branch info
$ git branch -a
* html5/develop b6e0324 update html
master 420f7f5 update test.php
remotes/html5/master b6e0324 update html
remotes/origin/HEAD -> origin/master
remotes/origin/develop 206c580 some change edit
remotes/origin/html5/develop b6e0324 update html
remotes/origin/master 420f7f5 update test.php
push html5/develop to origin server
$ git push origin html5/develop
Thank you for this. How about if the branch the html5/master branch was updated and I need also need that update to git-test project?