Duplicates:
I'm sure I've asked it wrong but I read that Git doesn't use a central repository like SVN does. One, I don't understand how you can have a decentralized version control system. I'm sure it works because so many use it but I don't understand the concept.
How can you have something everyone uses but not a centralized repository to hold the source code?
I suppose this is more of a git vs. svn also, Which do you use? I read that git is better but not as integrated in most IDE tools as SVN.
I'm still learning.
Thank you.
The difference between Git and SVN version control systems is that Git is a distributed version control system, whereas SVN is a centralized version control system. Git uses multiple repositories including a centralized repository and server, as well as some local repositories.
Advantages of Git Over SVNThe ability to work locally and offline is one major advantage to Git. SVN requires contributors to be connected to the main repository server, which essentially eliminates working offline. Git also outperforms SVN when it comes to merging and conflict resolution.
SVN is better than Git for architecture performance, binary files, and usability. And it may be better for access control and auditability, based on your needs.
Git is decentralized, or distributed. This means that to edit, developers download the source code onto their local machines to work and make edits, while Perforce is centralized, meaning all developers are making edits to one master branch kept on a server and accessible to all team members.
That always confused me too before I started using Git. People like to overemphasise how different it is.
The truth is that you can, and most likely will, set up your Git system to have a single "master" repostiory. What's different with Git is that every "working directory" also gets its own client repository. A large amount of Git's design is for merging code back and forth between client repositories and a parent.
If you want to go with a single master repository sitting on a server somewhere, and all users being direct clients of that repository, you can easily do that. What makes Git really different is that you don't have to do that. You could instead have a big tree of repositories from worker, to subgroup, to test group, to master if you want. You could instead set up a chain from worker to development master (updated frequently by developers) to remote customer site (updated rarely by the customer when they want a fix, and can get the private network up between them in Ethiopia and you in Toledo). The topology and workflow is up to you, not the tool.
My suggestion would be to try out Git yourself for a small (or pretend) project. Once you see how it works, you'll begin to see the possibilities.
The point of a DVCS is not "avoiding a central repository." Most DVCS-based projects I see have some notion of a common HEAD--people push patches to that HEAD, and that's where releases come from.
Instead, the primary advantage of a DVCS is that every working copy allows revision control. This has three primary advantages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With