Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

dvcs

svn

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?

like image 562
mmcdole Avatar asked Jan 20 '09 08:01

mmcdole


3 Answers

Not really. DCVS just allows more freedom in how to interact between developers without involving the central repository. The official repository is only official by consensus. Linux also has a central repository, the one from which the "official" kernel-releases are created, but there is no physical difference between the central, "official", repository and client repositories as it is in centralized VCS.

like image 130
JesperE Avatar answered Nov 18 '22 08:11

JesperE


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..

--

  • Diagrams and one paragraph courtesy of an article by Kalid Azad
like image 28
deizel Avatar answered Nov 18 '22 09:11

deizel


With distributed source control, a central "official" repository is established by policy - not source control tool architecture.

like image 8
RogerV Avatar answered Nov 18 '22 08:11

RogerV