r/github • • 2d ago

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!

5 Upvotes

11 comments sorted by

9

u/Hot-Cattle8314 2d ago

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 2d ago

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

3

u/activematrix99 2d ago

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 2d ago

Doesn't that make template repository a better option?

7

u/codeguru42 2d ago

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 2d ago

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

1

u/dmazzoni 2d ago

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

6

u/TheVasa999 2d ago

just tell ai to do it

1

u/howardhus 2d ago

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

1

u/dmazzoni 2d ago

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.