Creating a submodule in a git project
I have a Django project and it’s currently hosted in GitHub and it’s private. I’m looking to move many useful parts of it into an open-source project. I think I need to use a ‘submodule’ thing, but unfortunately I have no idea how to operate these.
Please can someone help me 🙂
One Solution collect form web for “Creating a submodule in a git project”
move many useful parts of it into an open-source project.
That means extract one or several directories (and their associated history) into several independant git repositories, each one pushed to a public GitHub repo.
To extract a sub-directory from a Git repo, see the
filter-branchcommand in this SO question
- “Howto extract a git subdirectory and make a submodule out of it?”
- Detach subdirectory into separate Git repository
- to reference those new repositories, reference them in your original private repo to see them again directly from your current Django project: see true nature of submodules.