CommonAccord / Site-Org

law as wiki > > tech as lego > > >
http://CommonAccord.org
27 stars 13 forks source link

Using Git to Manage Folders #31

Open HazardJ opened 9 years ago

HazardJ commented 9 years ago

It would be useful to have a way of managing parts of a repo- for instance at the folder level - so that one can share and update materials at that level. Examples are

(i) the software - it would be good to be able to obtain, vet and accept improvements to software, (ii) the little parts in [Z/Sec/xxx] etc. (iii) a matter file (all the documents relating to a particular matter), (iv) documents in a specialty maintained by some community, etc.

There is a broad set of use cases.

HazardJ commented 9 years ago

I tried playing around with git-based ways of doing this. The idea is that there is are separate repos for parts of the folder tree. You build your own instance by including the repos that you want. I almost got this working based on git.ignore, but failed.

So - questions:

  1. Are nested repos and git.ignore a viable approach?
  2. How to make that work.

Note that this approach is not exclusive. One could rely heavily on exogenous inclusion, etc. But it maps well to git and GitHub, and provides a local copy for off-line and rapid rendering. It offers the archiving capabilities of git.

HazardJ commented 9 years ago

@zmon has kindly offered to help with this. He send me a link : Git SubModules From https://chrisjean.com/git-submodules-adding-using-removing-and-updating/. I read it and am about to begin experimenting.

HazardJ commented 9 years ago

BEFORE I do, and after having read the chrisjean blog post - here is my thought (with a beginner's mind) of what it would look like ideally.

A Cmacc site would look like this, and you would be able to treat this as text (paste into an email and send to a colleague, for instance):

Title=MyRepoName =[github.com/CommonAccord/Bare.git] 59ec83 Doc/Z=[github.com/CommonAccord/Folder-Z.git] e0efcf Doc/Swarm=[github.com/CommonAccord/Folder-Swarm.git] master

Running this snippet would generate the git commands to make it happen.

Rerunning it would generate the git commands to make the update (optionally with confirmation dialogs).

HazardJ commented 9 years ago

BEGIN THE EXPERIMENTS:

I've made two repos of folders as I imagine them:

The code: https://github.com/CommonAccord/Folder-Cmacc

Doc/Z/ https://github.com/CommonAccord/Folder-Z

HazardJ commented 9 years ago

And made an instance where I want those: https://github.com/CommonAccord/Experiment-Sync