Version control
After today, you can explain how Git records a team’s work as commits and branches, and why merged code isn’t always live.
Dip your toes 1 min
Version control is software that records every change to a team’s files: what changed, who changed it, and why. Almost every team uses one called Git. Each saved change is a commit, a snapshot with an author, a time, and a short note. Engineers work on branches, separate lines of work, and merge them back into the main version once the work is reviewed. For a designer, two ideas matter most. Git’s history can tell you when a screen stopped matching your design, and why. Also, merged doesn’t mean live. A change to Instagram’s iPhone app can merge on Tuesday, then wait for a new build, App Store review, and each phone’s update.
The full lesson 9 min
Why this exists
Picture a few hundred engineers editing the same codebase on the same day. Two of them change the same file, and one quietly overwrites the other. Someone ships a change that breaks checkout, and nobody can tell which edit did it. Nobody can say what the file looked like an hour ago, either.
Before good tools existed, teams copied whole folders and named them things like final-v2-REAL, and that fell apart past a handful of people. Designers know this from their own files. Figma’s branching, on its Organization and Enterprise plans, is the same idea: create a branch, review it, and merge it back.
Google Docs solves part of this problem for writing. It keeps a version history and lets people edit at the same time. That works for prose, because a half-finished sentence doesn’t stop the rest of the document from working.
Code is different. A half-finished change can crash the whole app. Engineers need private copies to work in, and a controlled way to combine them when they’re ready.
What it is
Version control is software that records every change to a set of files: what changed, who changed it, when, and why. Git is the version control system almost every team uses. Linus Torvalds wrote it in 2005 to manage the Linux kernel, the core of the Linux operating system. Linux also sits inside every Android phone.
Git records history as a timeline of commits. A commit is a saved snapshot of a set of changes, with an author, a timestamp, a short message, and a unique ID. A good commit message says what changed and why, like “Fix overlapping labels on the checkout button.” Read in order, the commits tell the full story of a product’s code.
Engineers read each commit as a diff: the difference between it and the commit before. A diff shows removed lines in red and added lines in green, with a few unchanged lines around them for context. When you look at a pull request on GitHub, its Files changed tab is a stack of diffs, one per file. Learning to skim a diff is most of learning to read a pull request.
Teams set up the main branch so its history doesn’t get erased. To undo a bad change, an engineer adds a new commit that reverses it, called a revert. The mistake and the fix both stay on the record. That’s what makes Git safe: almost any change can be undone, and the team can always see how the code got where it is.
Work happens on branches. A branch is a separate line of commits that splits off from the timeline, so you can change things without affecting anyone else. The main branch, usually named main, is the line everyone treats as the real version of the product. When the work on a branch is done and reviewed, it gets merged, which means its commits get combined into main.
Sometimes two branches change the same lines in different ways. Git can’t decide which version to keep, so it stops and asks. That’s a merge conflict, and a person has to resolve it by choosing or combining the two versions by hand.
Git runs on each engineer’s computer, and every copy holds the full history. GitHub is a website, owned by Microsoft, that hosts a shared copy of a repository for the whole team. Getting your own copy of a repository for the first time is called cloning it. After that, engineers push their commits up to the shared copy and pull other people’s commits down.
GitHub also adds what Git doesn’t have on its own: pull requests for proposing and reviewing changes, comment threads, and issue tracking. GitLab and Bitbucket do the same job. Git is the tool, and GitHub is one place to keep and discuss what it records.
You can see all of this in public. Microsoft builds VS Code, its code editor, in an open repository on GitHub. Anyone can scroll through its commits, look at its branches, and read the discussion on every pull request.
How it shows up in your work
When an engineer says a fix is “on a branch,” the code is written but hasn’t joined main. It isn’t part of the product yet. Branch names often carry a ticket number and a short label, like fix/1432-checkout-label, so you can match a branch to the request that started it. Many teams create a preview link for every branch, a private copy built from that branch’s code and one of the copies Day 5 covers. Once code exists, that link is one of the best moments to review a change, because nothing has merged and changes are still cheap.
When you find a screen that doesn’t match the design, Git can tell you when it changed and who changed it. GitHub’s blame view, named after the git blame command, shows the last commit that touched every line of a file. The commit message and its pull request usually explain why. That reason is often a constraint you didn’t know about, which is more useful than assuming someone ignored the spec. Design tokens and icons often live in the repository too, so a brand color change shows up in this history like any other commit.
A long-lived branch, one that stays open for weeks, drifts away from main while everyone else keeps merging. When it finally merges, the conflicts pile up and the risk climbs with them. That’s why engineers push back on redesigns that ship all at once. They’d rather merge small pieces that stay hidden until launch day, using a feature flag, an on/off switch in the code that Day 24 covers.
The one thing people get wrong
“It merged” often gets heard as “it’s live,” but they’re different events. Merging puts a change into the main branch, the version of the code the team agrees on. It doesn’t put the change in front of users. Getting code onto the computers that users reach is a separate step called deploying.
On some teams the gap is minutes, because every merge deploys automatically. On others it’s a weekly release. Phone apps add more distance.
A change to Instagram’s iPhone app gets merged, built into a new version of the app, and sent to Apple for App Store review. It reaches people only when their phone installs the update. “It merged on Tuesday” and “users see it on Tuesday” are different claims, so ask which one someone means.
Ask an engineer this
“Can you show me the history of one screen I designed and walk me through why it changed?”
Pick a screen you know well, ideally one that changed in ways you didn’t expect. Watch how they find its files, open the history, and read the commit messages and pull requests behind each change. You’ll see which messages explain themselves and which ones say “fix stuff.” The walk-through also shows where your team records the reason for a change: in the commit, in the pull request, or in the ticket.
Terms from today
- Git
- The version control system almost every software team uses to record every change to its code.
- Commit
- A saved snapshot of a set of changes, with an author, a time, a message, and a unique ID.
- Branch
- A separate line of commits that lets someone work on a change without affecting anyone else.
- Merge
- The step that combines the commits from one branch into another, usually into the main branch.
- GitHub
- A website, owned by Microsoft, that hosts Git repositories and adds tools for reviewing and discussing changes.