What is Git?
Git is a distributed version control system that tracks changes in your code. Created by Linus Torvalds in 2005, it's the most widely used version control system in the world.
Git allows multiple developers to work on the same project simultaneously without overwriting each other's changes.
- Track every change made to your code
- Revert to previous versions when needed
- Work on features in parallel using branches
- Collaborate with teams using remote repositories
- Free and open source
How Git Works
Git tracks changes by taking snapshots of your files. Each snapshot is called a commit. Your project history is a chain of commits.
Example
# The three areas in Git:
# 1. Working Directory — your actual files
# 2. Staging Area — files ready to be committed
# 3. Repository — committed snapshots
# Flow:
# Edit files → Stage changes → Commit snapshot
# (working) (staging) (repository) 