部分共享git存储库 [英] Partial sharing of git repositories

查看:87
本文介绍了部分共享git存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是git的新手。我想知道是否支持以下情况,如果是的话,如何(即Git命令的设置和更新)。

一个存储库可以从三个不同的地方:'本地','镜子'和'github'。 '镜像'完全镜像'本地','github'镜像'本地',除了'受版权保护的'目录。



谢谢。

解决方案子模块可以工作,但是如果您尝试克隆某些包含其中某个遥控器不可用的子模块的东西,则会加重错误。

>

我的选择是使用'filter-branch'命令来维护一个公共分支,这个公共分支会在GitHub上省略供公众使用的版权文件。


I am new to git. I am wondering whether the following scenario is supported, and if so how (i.e. git commands for setup and update).

A repository is available from three different places: 'local', 'mirror' and 'github'. 'mirror' mirrors 'local' completely and 'github' mirrors 'local' except for a 'copyrighted' directory.

Thanks.

解决方案

A submodule can work, but if you try to clone something that contains submodules for which one of the remotes is unavailable, you'll have aggravating errors.

My alternative would be to use the 'filter-branch' command to maintain a public branch that would omit the copyrighted files for public consumption on GitHub.

这篇关于部分共享git存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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