goh
goh

Reputation: 29511

git: recommended structure

folks,

I have the directory structure like this:

webapps
|-- static_media
|-- django
      |---project A
      |---project B
      |--- .git
      |--- lib

I have two django projects A and B which are related (common apps in lib folder) and just differ by subdomain and the type of users accessing each. Currently, I maintain a git repository such that i commit files in project A and B into. However, I also have static files css and js for the projects that I forgot to include.

My question is, what is the recommended git structure here? Should I add an additional git repository for the static files? Having said that, I realize that my current repository structure is inappropriate because I will be slapping myself if I have new, independent projects in the future under django as well as css and js files for other projects.

So, really what should be the recommended git repository structure be like?

Upvotes: 2

Views: 1316

Answers (1)

lprsd
lprsd

Reputation: 87095

This is how I would have done it:

  • All projects have their own repos. So, Project A and Project B and lib.
  • All projects have their own static_media. So there would be a static_media inside A and B each.
  • Since lib is used in both A and B, it would be added as a git submodule.

Git is pretty flexible and accommodates lot of ways of doing it.

Upvotes: 2

Related Questions