How to push from one bare git repo to another?

前端 未结 3 2039
野的像风
野的像风 2021-01-08 00:54

Me and a couple of other guys from a big team are working on a separate page on the project. Let\'s call it groups page. While we work on the groups page, we need to exchang

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-08 01:33

    To make it simple, Git is a distributed version control system. This mean that whenever you clone from a repo, you clone the entire repository. And each clone is completely independent. In fact, what you clone on your machine is exactly the same as what's on the server, your clone can receive push/pull, etc. (Only difference is probably that you won't let anybody connect in via ssh)

    So, whichever way you go, if your coworkers pull from you, they can push your commit to the main repo. Same thing will apply with option 3, use your team git server, and when ready, some of you pull to his machine and push from there to the main server.

    So, in your case, option 3 would be the easiest. Although, once you push to the main repo, this repo will gave all the work you've done in your private server. So, I'm not even sure it's really useful for you to have your own server (unless you want to make sure nobody else touch your "private" branch).

提交回复
热议问题