What is Git ?
Whenever we try to look for the Answer, We often end up finding something like.
It's a Version Control System (VCS). But Hold ON !! what is VCS ??
In this blog you'll find Answers to questions
- What is Git?
- What is Verson Control System and why it is needed.
- History of VCS
- How Git Came into Picture.
- Why it's syntax is similar to Linux ?
- How Git is Actually Different from other VCS
What is Git?
Git is a Version Control System (VCS) for the files. It offers a bunch of things such as:
- Keep track of changes made to the file. (What changes made, When made, Who made the changes.)
- Compare Changes made in files to previous ones.
- Revert the file to any previous State.
What is Version Control System ?
Version control systems are a category of software tools that helps in recording changes made to files by keeping a track of modifications done in the code.
When a group of developers located at different locations across the world Contribute to the same project or different features. So in order to contribute to the product, they made modifications to the source code(either by adding or removing). A version control system is a kind of software that helps the developer team to efficiently communicate and manage(track) all the changes that have been made to the source code along with the information like who made and what changes have been made.
Why we need Version Control System ?
Let’s suppose if a team of developer add some new functionalities in an application and the updated version is not working properly so as the version control system keeps track of our work so with the help of version control system we can omit the new changes and continue with the previous version.
History of VCS
Local Version Control System
The first VCS built was a local VCS but soon discarded as it was a complete failure. The main problem is that everything is stored locally. If anything were to happen to the local database, all the patches would be lost. If anything were to happen to a single version, all the changes made after that version would be lost.
Collaborating with other developers or a team is very hard or nearly impossible.
Centralized Version Control System
- A centralized version control system has a single server that contains all the file versions. This enables multiple clients to simultaneously access files on the server, pull them to their local computer or push them onto the server from their local computer.
- Administrators have control over who can do what.
- This allows for easy collaboration with other developers or a team.
The biggest issue with this is that everything is stored on the centralized server. If something were to happen to that server, nobody can save their versioned changes, pull files or collaborate at all. Similar to Local Version Control, if the central database became corrupted, and backups haven't been kept, you lose the entire history of the project except whatever single snapshots people happen to have on their local machines.
The most well-known examples of centralized version control systems are Microsoft Team Foundation Server (TFS) and SVN.
Distributed Version Control System
- Distributed version control is a form of version control in which the complete codebase, including its full history, is mirrored on every developer's computer. Thus, everyone collaborating on a project owns a local copy of the whole project.
- if the server becomes unavailable, any of the client repositories can send a copy of the project's version to any other client or back onto the server when it becomes available.
- Git is the most well-known example of distributed version control systems.
How Git came into existence ?
For Kernel maintenance the Linux Community was using Bitkeeper a Source-Code Management since 2002-2005.
many Linux Developers gave up Bitkeeper because of some friction and the Prices.
- Then Linus Torvalds (Yepp that's him the father of Linux) decided why not make someone of it's own. Because they were facing some issues from Bitkeeper too.
The issues they faced - (which were kept in mind when making Git.)
- Speed one of the major reason when working with large codebases.
- Efficiency with large Projects and Complicated Design of Bitkeeper.
How exactly is Git different from other platforms.
- It’s faster to commit. (Commits are mainly on Local Repository and only committed to central repository once in a while.)
- No more Single point of Failure. (Every developer has there own repository so when central repository goes down it will not have very significant effect.)
- Available offline.
If you read till here. Please leave a feedback in the comments. Thanks :)