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?
-
Why would you have all projects under a single repository?Dave Newton– Dave Newton2013-01-09 19:54:48 +00:00Commented 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 usDave– Dave2013-01-09 20:17:32 +00:00Commented Jan 9, 2013 at 20:17
5 Answers
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.
1 Comment
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
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
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
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
git stash or make "Dump" commits which one later resets.git stash - I suspect we are talking about different things, lets stop the discussion.