[Labs-l] Sharing code in GitHub

Tim Landscheidt tim at tim-landscheidt.de
Fri May 16 22:44:37 UTC 2014


(anonymous) wrote:

> I pushed three repos just now[1][2][3], and I'm not sure about the correct
> way to deal with others. One of them contains some counter vandalism
> functionality, and I fear that publishing them makes vandals easier to
> bypass it somehow. Another one is basically a MediaWiki core repo, with a
> few patches on top of master to support [1]; I'm afraid pushing it will
> upload a full MediaWiki history.

> [1] https://github.com/liangent/mediawiki-extensions-Labs
> [2] https://github.com/liangent/mediawiki-maintenance
> [3] https://github.com/liangent/updatedyk

> [...]

I don't know if GitHub shares commits over all repositories
to minimize uploads, but if you would clone such a MediaWiki
"add-on", you could optimize the download by using the
"--reference" option à la:

| git clone --reference /local/mediawiki remote:/mediawiki-add-on /local/mediawiki-add-on

This will only download the commits from the remote reposi-
tory that aren't part of the local repository (for native
Git protocols; http repositories usually won't be fine-
grained enough).

This isn't that useful when you just need to initialize a
new working directory every three months, but can save quite
some time for example when you regularly run a test suite
and/or you have submodules with remote URLs (then "git
submodule update --reference" & Co.).

Tim




More information about the Labs-l mailing list