What is Git ?

1.1 What is Git

Git is a distributed version control system (DVCS) that lets you track changes in your codebase, collaborate with others, and manage project history efficiently.

It was created by Linus Torvalds in 2005 to support the development of the Linux kernel.

1.2 Why use Git ?

• Track every change: See what was changed, when, and by whom.
• Work collaboratively: Multiple developers can contribute without overwriting each other's work.
• Undo mistakes: Roll back to previous versions easily.
• Branch with ease: Work on features in isolation, then merge them in.

1.3 Git vs Traditional Version Control

FeatureGitCentralized VCS
TypeDistributedCentralized
Offline Support✅ Yes❌ No
Speed⚡ Fast🐢 Slower
CollaborationDecentralizedCentral server bottleneck
MergingAdvanced algorithmsOften manual/conflict-prone

1.4 Git in real world

Imagine you are writing a novel with a friend:

• Git keeps a record of each edit.
• It allows both of you to write in parallel, then merge.
• If your friend deletes a paragraph accidentally, you can recover it.