Same Django project different GIT repositories

Which is the best way to have two different repositories on the same Django project?

I started developing a project months ago and I have the whole folder in the repository. I want to reuse some apps in the project and I would like to create a different repository for them since they will be spin-offs project. But I want to keep it updated.

  • How to solve “Application Error” in Heroku (Python)
  • Cannot syncdb “DatabaseError: no such table: django_site”
  • How can I write a Groovy Jenkinsfile for a Django application to run my tests?
  • How to ensure database changes can be easily moved over DVCS using django
  • How should I stage my bitbucket + heroku django app for development and deployment?
  • Buildout/Mr. Developer randomly failing to pull from Git
  • Which is the best workflow, methodology, etc… to achieve this? Or is it a bad approuch?

    Thanks!

    Xavi

  • How do cherry-pick and revert work?
  • Xcode git add files
  • Git: subtree or submodule for personal projects?
  • Alternative to git ls-tree -r HEAD — . :!foo
  • set up git alias, but then calling it gives 'command not found'
  • Workflow for using Git SVN and a Remote Git Repository with multiple users
  • 2 Solutions collect form web for “Same Django project different GIT repositories”

    You can each app wrap as a python package, which has its own GIT repo. and save all your packages in some private (or public?) python packages repository (like Gemfury).

    Than, in your projects, just use the app as you install django itself.. pip install myapp

    This way the apps a reuseable and decoupled from any prjoect.

    (This works very well for myself.. perhaps there is a better way)

    You can use submodule,

    $git submodule add git://github.com/yourusername/project2.git project2
    
    $cat .gitmodules
    

    .gitmodules output:

    [submodule "project2"]
      path = project2
      url = git://github.com/yourusername/project2.git
    

    If you want to Clone some git project like submodule,

    git clone git://github.com/yourusername/project2.git
    cd project2
    git submodule init
    
    Git Baby is a git and github fan, let's start git clone.