views:

223

answers:

2

Hi all

I created a custom project skeleton as a start for my django projects, hosted on a public repo at github.

Id like to use this as root folder for my new, public and privates projects, also hosted @github.

The problem is i cannot use this one as a submodule because as fas ar i know i cannot add submodules inside another submodules in the same git repo. and in my case i want to add submodules inside the skeleton folder.

As exercice, for a public projectB, i just created a branch of my skeleton but seems tricky as my projectB code is hosted inside the skeleton repo on a separate branch.

How would you do this in GIT ?

Also, any trick at github on how to create 'private branches' like from public repos ?

Thanks :)

Julien

A: 

I've successfully created git repos whose submodules were branches in the same repo. I haven't tried this with sub-submodules though. To avoid sub-submodules, just dedicate a branch for your "prototype". Whenever you need a new project branch from this head.

PS: if you want a private branch on github, you need to become paying member. If you want private branches for cheap, just don't upload them to github.

David Schmitt
I created skeleton branches for a new project but how to use this as 'private' branch . (change the 'origin' to a new private repo?)I am github paying member, i can create private repos but not privates branches inside public repos.
jujule
As soon as you start a new project from this skeleton branch, everything contained in it will become (public) history of the new project. I'm not quite understanding what you're trying to accomplish.
David Schmitt
"If you want private branches for cheap, just don't upload them to github".Note that those are not really *private*. All the code will still be accessible, and easily found.
Jordi Bunster
A: 

I finally decided to have seperate public branches as skeletons then use private submodules to host private code.

this solution looks powerful and secure enough for me.

thanks for suggestions

jujule