How can I use Git with multiple remote repositories?

前端 未结 1 1346
生来不讨喜
生来不讨喜 2021-01-31 21:15

I use currently use Heroku for rails hosting which uses a Git repository for deployment. I also have a hosted Git repository that I use as my main source control for history/ba

相关标签:
1条回答
  • 2021-01-31 21:44

    Add them both as remotes:

    git remote add origin ssh://myserver.example.com/var/git/myapp.git
    git remote add hosted ssh://myotherserver.example.com/var/git/myapp.git
    

    [1] http://toolmantim.com/thoughts/setting_up_a_new_remote_git_repository

    [2] http://www.kernel.org/pub/software/scm/git/docs/git-remote.html

    0 讨论(0)
提交回复
热议问题