2

I'm building a "CMS" (used lightly) in PHP which I'm providing as open source via a Github repo. I'm building it as the new homepage for my company and the content in its various forms provide a nice example on how to use the various classes and functions.

At first, I left my content in there (all stored as Markdown text files) - about pages, client examples, blog posts - but then got scared and added in Lorem Ipsum and fake images. For some reason, even though this will all be available to the public at our URL, it just felt like a bad idea to have the design, content, and everything else so easily accessible. Still, it would be (a) nice to have everything in one repo, (b) a great gesture to say "hey, what's mine is yours," especially since we concentrate on open source, and (c) just makes what's already possible (stealing our design and content) only slightly easier.

Is there any way a git repo can manage (semi-)private content while still publishing it on a public repo?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
joshcanhelp
  • 194
  • 2
  • 13
  • Why not? Don't see any issue as long as you're not giving away company secrets or doing something against someone's license. – John Aug 14 '12 at 16:19
  • This question might be better on programmers.stackexchange but not 100% sure. – John Aug 14 '12 at 16:20
  • Thanks John ... The same content that's in the repo will be on a completely public site. – joshcanhelp Aug 14 '12 at 16:31
  • Well, my company has completely banned access to Github as a security risk because it offers a way to easily 'export' company information. (Dropbox etc are also banned) – Philip Oakley Aug 14 '12 at 22:04
  • I have changed slightly your question to adapt it to SO standards. – VonC Aug 15 '12 at 09:03
  • I understand why it was closed now but glad I got an answer! Thanks to everyone who contributed... – joshcanhelp Aug 15 '12 at 22:02

1 Answers1

2

As detailed in "Can open source code hosted at github be closed-source?":

GitHub itself has nothing to do with how you license your code. So you can decide to stop publishing your source via GitHub, but everything that has been forked and cloned from it up to that point is of course still "out there" under the open source license you originally used.

So it is more about:

  • accessibility: does it matter that everyone can access/read your code?
  • licensing: what kind of license do you attach to the content of that repo?

I prefer keeping separate:

  • template files (the equivalent of your Lorem Ipsum files)
  • script files able to generate the actual valued files

from the value files themselves (the files with the actual "company" data).
I store those ones away from GitHub.

That way, I can declare a content filter driver which, on checkout, will automatically generate the final files for me.

content filter driver

(See "Automatically ignore selected code changes when pushing to a git-hub repository" for more)

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I'm at about 60% comprehension level on this but this did, basically, answer my question and give me a plan on how to structure this. Thanks! – joshcanhelp Aug 15 '12 at 22:03