Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Git Basics Working With Remote Repositories Working With Remotes

rajbee
rajbee
6,657 Points

Is this an accurate summary of this lesson ?

Please let me know.

When multiple developers have to work on the same code project, they can have two ways of setting up their code repository, depending on the size of the teams and style of project management.

Central repository - All the code is stored on one server and everyone pushes their changes into it or pulls code out of it.

Distributed repository - There are many groups of developers and each group has its own repository, often hosted on the computer of one of the developers in the group. The others in the group simply clone the repository first and then everybody in a group pulls and pushes each others history as needed.

2 Answers

Eric Amundson
Eric Amundson
19,530 Points

Howdy Raj,

I think that's a fair summary.

It's important to note that Git is a Distributed version control system, so each person with a clone of the project has the entire project in their own git repo, rather than just checking in/out files from a central repo (more like Subversion).

With the Central Repo model, people can push and pull from the central repo, but don't exactly have to, unless they're sharing their work with the team. Either way, they have a full copy of the repo when they clone.

Alternatively, you can merge your repo with any other accessible instance of the repo. So, if you and I are working on the same project, we could feasibly push, pull, and merge from each other's git repos without having a central repo.

Personally, I don't know many folks that work like this as a lot of devs are using GitHub, BitBucket, Beanstalk, or the like, which puts your repo in the cloud, which approximates the Central Repo model.

I hope that makes sense and helps.

rajbee
rajbee
6,657 Points

I don't know why this got a negative vote. People should not be allowed to down vote unless they provide a reason that is at least 100 characters long or so. The same problem plagues stack overflow and they did nothing to fix it.

I agree with you. Down voting needs to be curbed. Every honest question, and a fair attempt at the answer, should is validated, and should not be downvoted. That irks me about stack overflow.