r/github • • Oct 21 '26

Question How to make part of my closed source repository an open source one?

Hello everyone hope you have a lovely day.

so I'm currently working on a game engine I'm developing and I was working on a renderer based on opengl, I'm proud of the progress that I have done so far and I want my opengl renderer to be open source for the whole community.

I thought about making my repo a template repo but I wonder if there is another options available.

Thanks for your time appreciate your time!

6 Upvotes

13 comments sorted by

10

u/Hot-Cattle8314 Oct 21 '26

Extract your OpenGL renderer into its own public GitHub repository. You can then add the public repository to your engine as a Git submodule, allowing you to maintain the renderer independently while continuing to use it in your engine.

0

u/miki-44512 Oct 21 '26

Sorry I have no experience, could you recommend a tutorial or a documentation on how to do such a thing?

3

u/activematrix99 Oct 21 '26

It's pretty straightforward in git. First build your renderer as it's own git repository. It can then have it's own license and live on github or wherever. Next, add the new git repository as a submodule of your master git project with git submodule add The only real downsides are that the submodule requires manual updates.

1

u/miki-44512 Oct 21 '26

Doesn't that make template repository a better option?

7

u/codeguru42 Oct 22 '26

Do you expect other people to use your renderer as a starting point for a whole repo? Do they need a specific project structure to use it? Or is it something the can plug into any project?

I suspect the later. And I recommend you learn git and GitHub basics before worrying about template repos.

1

u/HommeMusical Oct 22 '26

No. Honestly, template repositories are only useful if you are in a very large organization that creates a lot of repos.

1

u/dmazzoni Oct 22 '26

I don't see how a template repository would help at all. It makes zero sense.

6

u/TheVasa999 Oct 22 '26

just tell ai to do it

1

u/howardhus Oct 22 '26

one can only wonder how sloppy the vibecode process was until you had "your" renderer

1

u/dmazzoni Oct 22 '26

Make a new repo. Copy the code you want to be public to that repo. Publish it on GitHub.

There's nothing confusing about that.

The second part is only slightly tricky. What you want is for your existing repo to not diverge from your new public one. The way to do that is with "git submodules". Look it up.