有没有更好的方法来保留您自己的定制开源项目副本? [英] Is there a better way to keep your own copy of a customized open source project?

查看:20
本文介绍了有没有更好的方法来保留您自己的定制开源项目副本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用一个开源项目来托管一个站点 (OrchardCMS),该站点通过 CodePlex 在 GIT 存储库中可用.我已经对特定于我的实现的源代码进行了一些自定义,我希望保留并处于源代码控制之下.然而,当源引擎发布新版本时,挑战就出现了.

I use an open source project to host a site (OrchardCMS) which is available in a GIT repository via CodePlex. I have made a few customizations to the source code that are specific to my implementation and I want to keep preserved and under source control. However the challenge arises when there's a new release of the source engine.

我的更改肯定不会进入每个人都使用的祝福存储库.

My changes certainly won't go into the blessed repository everyone uses.

目前我正在使用两个存储库.我使用 CodePlex OrchardCMS 存储库从社区使用的引擎中获取最新更改(并且我贡献了一些错误修复).

Currently I'm using two repositories. I use the CodePlex OrchardCMS repository to get the latest changes from the engine the community uses (and that I contribute some bug fixes to).

然后我有自己的副本,其中包含我的更改.为此,我使用自己的源代码管理(来自 Microsoft 的托管 TFS).当核心引擎的更新出来时,我将当前源中的所有文件 XCOPY 到我自己维护的存储库并将它们提交到我的项目中.

I then have my own copy which contains my changes. For this, I am using my own source control (hosted TFS from Microsoft). When an update to the core engine comes out, I XCOPY all the files from the current source to my self-maintained repository and commit them to my project.

然而,这似乎应该有更好的选择.有什么意见吗?

However this seems like there should be a better option. Any opinions?

推荐答案

您可以使用 git 来获得替代解决方案.

You can use git to have an alternative solution.

您可以克隆 git 主存储库并使用新版本保持更新,并且您可以在本地分支上保留不会与任何人共享的本地修改.

You can clone the git main repo and keep it updated with the new relases, and you can keep your local modifications, that aren't to be shared with anyone, on a local branch.

当新版本发布时,您只需更新 git 存储库中的 master 分支,然后您就可以 rebase在其上合并您的本地修改.

When a new release came out, you simply update your master branch in your git repo an then you can rebase or merge your local modications on top of it.

这篇关于有没有更好的方法来保留您自己的定制开源项目副本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆