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 🙂

  • “git push”: slug compilation hangs
  • error: RPC failed; result=22, HTTP code = 413 fatal: The remote end hung up unexpectedly
  • How to write setup.py to include a git repo as a dependency
  • Heroku push rejected, Could not communicate with vendor, please try again later
  • Change default project root - Heroku
  • Error Killed: 9 after command “git add .”
  • Joe

  • Recover once staged but not committed files?
  • How can I restore a Git repo and its Github remote to a previous commit without using reset?
  • Is there a way to make git ignore your HOME setting?
  • Unable to delete unwanted commits made on github
  • How long does git keep out-of-branch commits?
  • How to run git rebase interactive mode to remove duplicate commits
  • 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-branch command in this SO question
      (also in:

      • “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.
    Git Baby is a git and github fan, let's start git clone.