There are two general varieties of version control: centralized and distributed. Distributed version control is more modern, runs faster, is less prone to errors, has more features, and is somewhat more complex to understand. You will need to decide whether the extra complexity is worthwhile for you.
Centralized version control
Centralized version control systems are based on the idea that there is a single “central” copy of your project somewhere (probably on a server), and programmers will “commit” their changes to this central copy.
“Committing” a change simply means recording the change in the central system. Other programmers can then see this change. They can also pull down the change, and the version control tool will automatically update the contents of any files that were changed.
- Centralized systems are typically easier to understand and use
- You can grant access level control on directory level
- performs better with binary files
In distributed version control, every developer “clones” a copy of a repository and has the full history of the project on their own hard drive. This copy (or “clone”) has all of the metadata of the original.
This method may sound wasteful, but in practice, it’s not a problem. Most programming projects consist mostly of plain text files (and maybe a few images), and disk space is so cheap that storing many copies of a file doesn’t create a noticeable dent in a hard drive’s free space. Modern systems also compress the files to use even less space.
The act of getting new changes from a repository is usually called “pulling,” and the act of moving your own changes to a repository is called “pushing”.
One common misconception about distributed version control systems is that there cannot be a central project repository. This is simply not true — in most cases you have one central server which is an authoritative one.
- Performance of distributed systems is better
- Branching and merging is much easier
- With a distributed system, you don’t need to be connected to the network all the time (complete code repository is stored locally on PC)
- 4 concepts of Versioning Control System every Software Engineer need to understand
- 3 reasons why you should use Version Control System
To join our community Slack 🗣️ and read our weekly Faun topics 🗞️, click here⬇