What is Git? — 5minslearn
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
What is Version Control System?
Version control, also known as source control, is the practice of tracking and managing changes to software code that help software teams manage changes to source code over time.
What is Distributed Version Control System?
To understand this term clearly, we need to know about
Local Version Control System
Centralized Version Control System
Local Version Control Systems
Many people’s version-control method of choice is to copy files into another directory (perhaps a time-stamped directory)
This approach is very common because it is so simple, but it is also incredibly error prone
Centralized Version Control Systems
Centralized Version Control Systems (CVCSs) such as CVS, Subversion, and Perforce, have a single server that contains all the versioned files, and a number of clients that check out files from that central place
This has been the standard for version control many years
Advantage of this system is everyone knows to a certain degree what everyone else on the project is doing
Disadvantage of this system are,
1. If that server goes down for an hour, then during that hour nobody can collaborate at all or save versioned changes to anything they’re working on
2. If the hard disk the central database is on becomes corrupted, and proper backups haven’t been kept, you lose absolutely everything — the entire history of the project except whatever single snapshots people happen to have on their local machines
Distributed Version Control Systems
Distributed Version Control Systems (DVCSs) such as Git, Mercurial, Bazaar or Darc, clients don’t just check out the latest snapshot of the files, instead they fully mirror the repository
Thus if any server dies, and these systems were collaborating via it, any of the client repositories can be copied back up to the server to restore it
Every clone is really a full backup of all the data
The primary advantage of this system is that they deal pretty well with having several remote repositories they can work with, so you can collaborate with different groups of people in different ways simultaneously within the same project
This allows you to set up several types of workflows that aren’t possible, such as hierarchical models
Goals of Git
Speed
Simple design
Strong support for non-linear development (thousands of parallel branches)
Fully distributed
Able to handle large projects like the Linux kernel efficiently (speed and data size)
Since its birth in 2005,
Git has evolved and matured to be easy to use and yet retain these initial qualities
It’s incredibly fast, very efficient with large projects, and it has an incredible branching system for non-linear development
Subscribe to our newsletter to receive more such insightful articles that get delivered straight to your inbox.
References
Pro Git Book by Scott Chacon and Ben Straub
Git Official Documentation https://git-scm.com/
Atlassian Git Documentation https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud
Subscribe to my newsletter
Read articles from 5 Mins Learn directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by