An Introduction to Git

3 0 0
                                        

Where did it came from?
Git has been created by Linus Torvalds and released for the first time in 2005.
It was originally designed to keep track of the changes in the Linux Kernel, a vast project with multiple versions and implicating even more developers.

How is Git different from other VCS?
Git is a DVCS: Decentralised Version Control System. Unlike other VCSs, Git doesn't not depend on an online server to function. Each Git local repository contains the full database of your project. As a matter of fact, you can track a project without ever sending your data online.
Unlike other VCSs, Git is fast no matter how big your project is  because it doesn't store your progress as a change history of each file like you can imagine, it actually store snapshots of your project.

How does it works?
To put it simple, Git works as a small file system with built-in history tracker. This is mainly because it's been developed by L.Torvalds who is used to work kernels.

When you modify a file, Git detects the changes and add the file to a staging area called the index.
When all changes are done, you select the files to be committed in the staging area and make the commit.
When committing, Git stores a reference to the version of your file with a SHA-1 string and adds it to the snapshot. If you didn't modified a file, the reference to his actual version will be added to the snapshot.

This "modify, stage, commit" process only add informations to your local database, therefore it's really hard to destroy your work completely without hope to regain it later.

You've reached the end of published parts.

⏰ Last updated: Feb 01, 2021 ⏰

Add this story to your Library to get notified about new parts!

A Path Through Ignorance: GitWhere stories live. Discover now