How to push from one bare git repo to another?

前端 未结 3 2041
野的像风
野的像风 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:35

    Is there a way to push from one bare clone to the main github repo?

    Yes, you don't have to be in a work tree to push changes from a bare repo.

    Simply ssh to the place where you 'local master' is, and run:

    git push origin master
    

    As the other answer point out, you can also push directly from your local copy to a remote master, but it's sometimes more convenient to have an automated 'gatekeeper' repository like this that can be triggered to push changes out (eg. after review) to multiple remote repositories via automation, without worrying about setting up ssh keys and so forth for a specific individual to push the changes out.

提交回复
热议问题