简体   繁体   English

分叉开源存储库的工作流程

[英]Workflow for forking an open source repository

I'm working on a product that is a fork of an open source repository (which I also maintain). 我正在开发一种产品,该产品是开放源代码存储库(我也维护)的分支。 My product is a super set of the open-source repository and is hosted as a private repo on Github. 我的产品是开放源代码存储库的超集,并作为Github上的私有存储库托管。

Let's call the open-source repository "os" and my product's repository "prod". 我们将开放源代码存储库称为“ os”,将我的产品的存储库称为“ prod”。

I have both repos cloned on my dev machine. 我在我的开发机器上都克隆了两个仓库。 When I want to change "os", i enter that directory, do my changes, commit and push to Github. 当我想更改“ os”时,我进入该目录,进行更改,提交并推送到Github。 I then jump over to my "prod" directory, "git fetch os" and "git merge os/master". 然后,我跳到我的“ prod”目录,“ git fetch os”和“ git merge os / master”。

This is starting to be very cumbersome. 这开始变得非常麻烦。 I'd much rather do the changes in "prod" and then push the commits over to "os". 我宁愿在“ prod”中进行更改,然后将提交推送到“ os”。 is this possible in some way? 这有可能吗?

Use Git Submodules . 使用Git子模块 You can use OS as a submodule within Prod, keep making changes in OS, (and prod). 您可以将OS用作Prod中的子模块,并继续在OS(和Prod)中进行更改。 When you're done, you push OS and Prod. 完成后,按下OS和Prod。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM