Introduction
What is Git?
Git is a version control system. It keeps a complete history of your project. Each saved snapshot is called a commit. If something breaks, you can see exactly what changed, who changed it and when, and undo it.
Why every developer uses Git
- Undo mistakes: go back to any earlier version of any file.
- Experiment safely: try new ideas on a separate branch without touching working code.
- Teamwork: many people can work on the same project at once.
- Backup: push your code to GitHub and it's safe even if your laptop dies.
- Portfolio: your GitHub profile shows employers what you've built.
Git vs GitHub
| Git | GitHub | |
|---|---|---|
| What | A tool | A website |
| Runs on | Your computer | The internet |
| Does | Tracks changes | Stores Git projects online, adds pull requests, issues, collaboration |