Alex Rivera | Logout

Is using a central repository going against GIT's purpose?

Asked 2009-01-20T08:49:22.967
33

If you are in a corporate setting with many people working on a particular application, is it going against the grain of a distributed version control system to have an official central repository?

Sometimes I struggle to understand the concept of a distributed version control system such as GIT in a corporate environment. If you didn't have a central repository, wouldn't it be a PITA to figure out who had the latest updated version to pull from, who has feature x or bug fix y that everyone needs to grab, etc, etc.

Is it defeating the purpose of GIT to use it in a similar fashion to SVN, with a central repository that everyone pushes/pulls from? Every time I think about doing that I feel like I'm missing the point of everything.

Could someone enlighten me?

Edit
Report

1 Answer

29

You are probably thinking along the lines of this diagram:

alt text

This will probably look like chaos coming from a CVCS. "We need some order", I hear you say?

If you didn't have a central repository, wouldn't it be a PITA to figure out who had the latest updated version to pull from, who has feature x or bug fix y that everyone needs to grab, etc, etc.

Yes. Unlike a CVCS There’s not really a “latest version”. If there’s no central location, you don’t immediately know whether to see Sue, Joe or Eve for the latest version. A central location helps clarify what the latest “stable” release is.

Something a bit more like this:

alt text

It might also be worth noting that there could be more than one perceived central repository depending on the remits of groups of people within an organisation.

Imagine a project manager who manages multiple development teams, each team might have a "central" repository which they push to. Every week, the project manager might pull changes from each team into his "central" repository, merge them and push them back out to his teams' "central" repositories.

This probably isn't a great example (I am still getting my head around all this too), but that is just one project manager. Throw in a few more projects/managers and QA team, then you might see where I am coming from..

--

answered 2009-01-20T10:43:30.100

Your Answer