Think of version control like Google Docs version history — but for code. Every change you make is recorded: who changed it, when, and exactly what changed. If something breaks, you go back to the last working version in 5 seconds.
Now imagine this without version control. You wrote 50 test scripts. Your colleague overwrites 3 of them. Nobody knows what the original code was. Your lead asks "who changed LoginTest?" and nobody has an answer. This happens in teams that share code over email or shared drives. Version control eliminates this chaos.
| Centralized VCS (SVN) | Distributed VCS (Git) |
|---|---|
| One central server stores everything | Every person has a full copy of the repo |
| Must be connected to the server to commit | You can commit offline and sync later |
| Server goes down = nobody can work | No single point of failure |
| Older approach — some legacy companies still use it | Industry standard — 95%+ companies use Git |
Don't confuse Git and GitHub. Git is the tool that runs on your machine and tracks changes. GitHub is a website that hosts your Git repos online and adds collaboration features (Pull Requests, Issues, Actions). Think of it like: Git = engine, GitHub = the car.
Q: What is Git and why do you use it in your automation project?
A: Git is a distributed version control system that tracks changes to files over time. In our automation project, we use Git so that multiple testers can work on the same framework without overwriting each other's code. Every change is tracked with a commit — we can see exactly what changed, who changed it, and when. We use branches for each feature, Pull Requests for code review, and CI pipelines pull our test code from Git to run automated tests on every commit.
Key Point: Git tracks every change to your code — who changed what, when, and why. It's the foundation of professional team collaboration.