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 🙂

  • Cannot syncdb “DatabaseError: no such table: django_site”
  • Django 1.8 deployment error on heroku
  • Limitations on forking from a GIT repo created with GIT-SVN?
  • Best Practice for following Subversion repository Trunk: Git (Mirror), Git-Svn, Subversion?
  • Python Django 1.7 Ubuntu 14.04 how do I deploy a django site on azure?
  • Get pip to work with git and github repository
  • Joe

  • Rebase from one branch to another's specific commit
  • libgit2 returned: Refspec 'refs/heads/origin/HEAD' not found error in TortoiseGit
  • git crash during rebase
  • Xcode: Add git server: “Server is disabled”
  • GIT Customer Merge Driver Problems(Windows msysgit 1.9.0)
  • SourceTree - make branch the new master
  • 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.