Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Partial sharing of git repositories

Tags:

git

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.

like image 564
namin Avatar asked Nov 10 '08 16:11

namin


1 Answers

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.

like image 102
Ben Collins Avatar answered Nov 26 '22 12:11

Ben Collins