Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm pretty new to the whole version control thing, and even more so with git. I recently installed git on my computer(s) and set it up on a NAS server.

However, I have several client folders with several project folders per client folder.

Each one of these client folders is a giant repo, encompassing every project inside it.

What I'm wondering is, is there a way to break this apart? So, for instance:

  1. The NAS is my 'origin', and has gitolite installed

  2. On computer1 I have every project folder in a client folder ever created (clean branch),

  3. In computer2 I do not a new checkout of the client branch (because all the projects in that branch are all completed and I don't need a working copy of it), but I do have a brand new project folder for that client "newproject".

Is there a way to commit and push to the NAS repo from computer2?

Or perhaps is there a better way of organizing all this?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

A better organization of Git repositories is to have one repo per client project (ie, many repo within your client folders: one .git within each client folder subdirectories which match a project root directory).

The idea of having one giant repo per client isn't necessary a good idea, especially:

  • if that folder is composed of projects which can evolve independently one from another.
  • if the sum total is huge in volume (which means any clone will be a big one)

If some of those projects are linked together, you still can view them as one (parent) repo, with the notion of submodules.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.