Git
A distributed version control system that tracks changes to code over time. Every developer has a full copy of the history. You commit changes, branch to experiment, merge to combine work, and push/pull to share. Git is the standard for version control.
Linus Torvalds · Created Git in 2005 for Linux kernel development
- Every software project.
- Any work that needs history and collaboration.
- Binary assets (use Git LFS or a different tool).
- Very large datasets.
Definition
Git records snapshots of your project as commits, each with a message and parent. Branches let you diverge (features, experiments) and merge back. It's distributed: each clone has full history. GitHub/GitLab host shared repositories.
Why it exists
To track who changed what, when, and why; to experiment safely in branches; to collaborate without overwriting each other; and to roll back mistakes.
How it works
git init creates a repo. git add stages changes, git commit saves a snapshot. git branch creates a divergent line, git merge combines. git push sends to a remote (GitHub), git pull gets others' changes. git log shows history.
Scaling limits
Learning curve (rebasing, cherry-picking, conflict resolution). Large repos get slow. Binary files don't diff well. Merge conflicts need manual resolution.
Cost shape
Free and open source.
Alternatives
- Mercurial — Simpler but smaller ecosystem.
- SVN — Centralized, older.
Failure modes
- Merge conflicts.
- Force-pushing over others' work.
- Committing secrets.
- Detached HEAD confusion.