close

可以使用 git remote add
git remote add bitbucket https://peicheng@bitbucket.org/peicheng/13pcproject.git
git push -u bitbucket
但是這樣要每次都push新的code,可能要下多次指令。

可以增加一個新的 remote
# cat .git/config

[remote "all"]
url = https://peicheng@bitbucket.org/peicheng/13pcproject.git
url = git@tmdesk:/home/git/13pcproject

再來使用
git remote update

下次改好code,
git add .
git commit -m "test multi remote"
git push all -u

or

新增到 remote git url 位置增加到 origin 去。
git remote set-url --add origin https://peicheng@bitbucket.org/peicheng/13pcproject.git
git push origin master



version control - git push to multiple repositories simultaneously - Stack Overflow
http://stackoverflow.com/questions/4255865/git-push-to-multiple-repositories-simultaneously

Using multiple remote repositories with Git | David Murphy
http://blog.schwuk.com/2013/02/11/using-multiple-remote-repositories-with-git/

Git - Remote Branches
http://git-scm.com/book/ch3-5.html


arrow
arrow
    創作者介紹
    創作者 peicheng 的頭像
    peicheng

    FLASHC

    peicheng 發表在 痞客邦 留言(0) 人氣()