1

I've been watching some GIT videos and reading a number of websites. So far it seems like GIT might be a good source control solution for my group. However, I have one question/concern. We have a number of different code projects and only a few people work on them at a time. If each of us had the entire code base on our machine, it would be a mess. Heck, a single machine probably wouldn't have the storage to accommodate the entire code base and history. Is it possible to set GIT up so that each developer only has the code they are working on on their machine? I was thinking that you might be able to create a branch for each project and developers could opt in or out of having it on their machines. Does that sound possible?

2
  • Why would you have all projects under a single repository? Commented Jan 9, 2013 at 19:54
  • Dave - I guess that comes from years of using source un-safe. Thanks to you all. A repository for related or single projects sounds like it would make GIT an excellent solution for us Commented Jan 9, 2013 at 20:17

5 Answers 5

3

That sort of defeats the entire raison d'être of a distributed version control system. I think you'll be surprised about how big a project will "fit" in git without causing any problems. If the linux kernel can do it, you probably can, too.

If your projects are reasonably orthogonal, you could just have each in its own repository.

Sign up to request clarification or add additional context in comments.

1 Comment

Git often gets better "compression" than zip or tar.
1

We have a number of different code projects and only a few people work on them at a time. If each of us had the entire code base on our machine, it would be a mess.

You would create a Repo for each project (assuming by project you mean standalone application). The developer would only need the source code for the project they are working on.

Second, GIT gets very good compression. Its used currently as the de-facto source control for linux (which is about 10 million lines of code last i heard). It works for them, chances are, it will work for you.

Comments

1

The repo for seven years of linux history is ~650MB on its default settings. Rather than creating branches for each subproject, just create an entire repo for each. If you need to collect all the subprojects together as a package, you can have a repo that contains them all as branches, and merge those into the single package in that repo.

Comments

0

Assuming that each project belongs to a group of people and the groups don't overlap THAT much, why not put each code project in a separate git repository? That way developers can only clone the repositorires they need.

Note though that in general distributed repositories use more space than centralized ones.

1 Comment

You meant that the checkouts take more space for DVCS than for centralized ones, right? Because one particular import of 10 years of SVN history into git took half the space on the repo side here.
-1

it possible, but I think you will create more mess by multiple branches(mostly in your brains) you need separate repositories, as it is already suggested

4 Comments

Why would you do branches as separate repositories in git??? This isn't mercurial.
what?? why you talking about mercurial? I think there is a misunderstanding, I've meant that it is easier to get lost with branches and where they are located.
They are located in the single checkout you have. Just don't use multiple directories and things stay simple. One can always git stash or make "Dump" commits which one later resets.
if you try to keep different projects in separated branches to not checkout others and to not "make mess" the things dont stay simple. anyway, thanks for your sufficient comments, you mentioned git stash - I suspect we are talking about different things, lets stop the discussion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.