Git Submodule or fork

I have a private repo in github that is the complete source code to my cms. Now I have a few local customers that I want to use the same code base on but with different themes. Is it better to fork the original project out into a repo for each one. Or use a submodule and create a new repo for each customer?

After each site is complete I would imagine the theme files wouldn’t change much but would need to pull in changes from the main repo when bugs are discovered.

  • How to clone a project and stay up to date with it?
  • Best way to fork SVN project with Git
  • Git:Why after Re-basing still my fork is behind the original repo master?
  • Splitting one Git repository into many - branches become forks
  • Updating multiple branches of a forked repository on Github
  • What are the core concepts of git, github, fork & branch. How does git compare to SVN?
  • How can I review my SSH key for github?
  • git for development and svn on production server
  • What is the content of global .gitIgnore file?
  • git-p4 and detached branches
  • Git: how to use stash -p to stash specific files?
  • Advice on multiple release lines and git-flow, for git non-gurus
  • One Solution collect form web for “Git Submodule or fork”

    Since there is two set of files involved (the common based, and the theme files), then submodules are appropriate.

    Each client would have:

    • a main git repo project
      • one submodule cloning the common code base
      • one submodule with specific files for its theme.

    Forking is more a cloning technique able to isolate one version of a repo from its copy.
    GitHub implements it with a fork queue to facilite cherry-picking back some changes made in forked Git repo.
    But the key thing here is: it concerns the all repository, not just one part.
    If several parts are involved, submodules are the right answer.

    Git Baby is a git and github fan, let's start git clone.