为项目框架创建一个git仓库

时间:2021-12-16 11:24:49

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

我创建了一个自定义项目框架作为我的django项目的开始,在github上的公共仓库上托管。

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

我喜欢将此作为根文件夹用于我的新公共和私有项目,也是托管@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.

问题是我不能将这个作为子模块使用,因为我知道我不能在同一个git repo中的另一个子模块中添加子模块。在我的情况下,我想在骨架文件夹中添加子模块。

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.

作为exercice,对于一个公共项目B,我只是创建了我的骨架的一个分支但是看起来很棘手,因为我的projectB代码托管在一个单独的分支上的骨架仓库中。

How would you do this in GIT ?

你会如何在GIT中做到这一点?

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

另外,在github上如何通过公共回购创建“私人分支”的任何技巧?

Thanks :)

谢谢 :)

Julien

朱利安

2 个解决方案

#1


0  

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.

我已经成功创建了git repos,其子模块是同一个repo中的分支。我没有用sub-submodules尝试这个。为了避免子子模块,只需为您的“原型”专门设置一个分支。每当你需要一个新的项目分支从这个头。

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.

PS:如果你想在github上有一个私人分支,你需要成为付费会员。如果你想要廉价的私人分支,只是不要上传到github。

#2


0  

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

谢谢你的建议

#1


0  

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.

我已经成功创建了git repos,其子模块是同一个repo中的分支。我没有用sub-submodules尝试这个。为了避免子子模块,只需为您的“原型”专门设置一个分支。每当你需要一个新的项目分支从这个头。

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.

PS:如果你想在github上有一个私人分支,你需要成为付费会员。如果你想要廉价的私人分支,只是不要上传到github。

#2


0  

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

谢谢你的建议