What Is Version Control?
The Problem Version Control Solves
Imagine working on a project and saving copies called final.doc, final_v2.doc, and final_REALLY_final.doc. It quickly becomes confusing and you cannot easily undo a mistake. Version control solves this properly.
A version control system records the complete history of a project. You can see every change, who made it, when, and why — and you can return to any earlier state.
What Is Git?
Git is the most widely used version control system in the world. It is distributed, meaning every developer has a full copy of the project history on their own computer.
Git Is Not GitHub
Beginners often confuse these two:
- Git is the tool that runs on your computer and tracks changes.
- GitHub is an online service that hosts Git repositories so teams can share and collaborate.
You can use Git on its own with no internet. GitHub adds online storage and collaboration on top.
Setting Up Git
After installing Git, tell it who you are. This information is attached to every change you make.
git config --global user.name "Ayesha Rahman"
git config --global user.email "[email protected]"The --global option applies these settings to every project on your computer, so you only need to do this once.
Key Terms to Know
- Repository (or repo) — a project folder that Git is tracking.
- Commit — a saved snapshot of your project at one moment.
- Branch — an independent line of development.
- Remote — a copy of the repository hosted elsewhere, such as on GitHub.
Version control is not only for large teams. Even working alone, Git lets you experiment freely, knowing you can always undo changes and recover earlier work.
Discussion
0No comments yet — be the first to leave one!