# Version Control and Git

> What version control is, and why most coders use Git for it. How one hidden folder in your repo holds your whole history.

**Course:** [Git and GitHub](https://learn.benibix.com/learn/development-version-control)  
**Time:** 9 min

**After this lesson you can:**

- Say what version control does
- Tell Git apart from GitHub
- Start a new repository

## What Git does, and where it keeps your history

Version control is a way to save every change to a set of files, so you can go back to any of them. Git is the tool almost everyone uses for it. It was written in 2005 to look after the code of Linux, and it is free. Every change you save records who made it, when and why.

Without it, people save copies by hand. A folder fills up with names like site-old, site-new and site-new-2. Nobody remembers which copy is which, or what changed between them. Two people editing at once is worse, because the last one to save wipes out the other's work.

A repository, or repo, is a project folder that Git is watching. It looks like any other folder, with your files in it. Inside sits one hidden folder called .git. That folder holds the whole history of the project. Delete it, and your files stay, but every saved version is gone.

You make a repo with one command, git init, run inside the folder. Git creates the .git folder and starts with an empty history. To copy a repo that already exists somewhere else, you use git clone instead. Both ways end the same: a folder that Git is tracking.

Git keeps the full history on your own computer. That makes it fast, and it works with no internet at all. Each person on a team has a complete copy, not just the latest files. If the shared copy on a server is ever lost, any one of those copies can rebuild it.

Git is not GitHub. Git is the program on your computer that saves the history. GitHub is a website that keeps a copy of a repo online, so a team can share it. You can use Git for years without ever making an account on any website.

Git is mostly used for code, but it works for any plain text. People track books, notes and settings files with it. It is weaker with big files that are not text, like videos and photos. It can store them, but it cannot show what changed inside them.

```console
$ git --version
git version 2.53.0
$ git init -b main shop
Initialized empty Git repository in /home/emma/shop/.git/
```
Check that Git is there, then make a repo called shop. The -b main part names its first branch main.

![A project folder called shop holds two files you can see, index.html and style.css. Beside them is a hidden folder called .git, drawn with a dashed border. Inside .git, three saved versions sit in a row from oldest to newest, each with a short code and a note: Add home page, Add style sheet and Make text blue. A note says that deleting .git deletes every saved version.](https://learn.benibix.com/diagrams/dev-git-repo.svg)

### Example: Lucy keeps her book in Git

Lucy writes a book of 12 chapters in plain text files. She runs git init in the book's folder and saves a version after each writing session.

After 3 months she has 140 saved versions. When her editor asks why chapter 4 got shorter, Lucy finds the day and the note in under a minute.

**Words in this lesson:** [Version Control](https://learn.benibix.com/term/development/version-control), [Git](https://learn.benibix.com/term/development/git), [Repository](https://learn.benibix.com/term/development/repository)

**Question:** What is the difference between Git and GitHub?

**Answer:** Git is a program on your computer, and GitHub is a website that hosts repos. Git saves the history on your own machine and needs no website at all. GitHub is one of several sites that keep a copy online so a team can share it.

---

Source: https://learn.benibix.com/learn/development-version-control/version-control-and-git
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
