How Git works, without commands
Summary: five concepts are enough to understand 90% of Git: the repository, the commit, the branch, the merge, and the remote. This lesson explains them one by one, visually, without asking you to type anything.
1. The repository (or repo)
A repository is simply your project folder, augmented with a history. Technically, it is a normal folder containing a hidden .git subfolder where Git stores its entire journal.
Important point: it is the .git folder that makes a folder "managed by Git". Delete it, and you lose the history but keep the code. Add it, and you turn an ordinary folder into a versioned project.
2. The commit — the basic building block
A commit is a snapshot of the project at a given moment, accompanied by a message explaining why that snapshot was taken.
Every commit has a unique identifier (a cryptographic fingerprint like a1b2c3…). It is impossible to modify a past commit without its identifier changing — which guarantees the integrity of the history.
A good commit message explains the why, not the what. "Fix email validation to accept addresses with a +" is better than "changed app.js".
3. The branch — working in parallel without risk
A branch is a parallel line of evolution of the project. It is the mechanism that lets Alice develop a new feature while Bob fixes a bug, without stepping on each other.
Key point: in Git, creating a branch is free and instant. The project is not duplicated; a marker is simply placed on a commit and you continue from there. This is what made Git revolutionary compared to SVN, where branching was costly and rarely done.
A branch always has a name: main (the main branch), feature/stripe-payment, fix/login-bug, experiment/new-ui… That naming is a convention, not a constraint.
4. The merge — bringing two branches together
When a feature is finished, the branch is merged into the main branch. Git compares the two histories and automatically combines whatever does not conflict.
Two possible outcomes during a merge:
- Automatic merge: Alice and Bob touched different files (or different lines of the same file). Git handles it alone.
- Conflict: both modified the same line of the same file. Git stops and asks a human to arbitrate. It is not a bug, it is a safety feature — without Git, that collision would have happened silently.
5. The remote — the online mirror
So far, everything happens on your machine. But a Git project only becomes truly useful once it is shared. That is the role of the remote.
A remote is an additional Git repository, usually hosted on GitHub / GitLab / Bitbucket, that your local repository synchronizes with.
Two directions:
- Send your commits to the remote (make them visible to the team).
- Fetch the commits the team has sent (stay up to date).
Important point: synchronization is voluntary. You can work locally for 3 weeks, make 50 commits, then send everything at once. Git does not bother you until you ask.
6. The complete workflow, in a single picture
Here is everything you have learned, on one vertical diagram.
This workflow is used at Google, Meta, Netflix, Microsoft — and in thousands of startups. Understanding it means understanding how software is made in 2026.
7. The commands matching each step
You do not have to memorize them now, but here is the mapping to place the vocabulary:
| Concept in this lesson | Matching Git command |
|---|---|
| Fetch a copy of the project | git clone |
| Create a branch | git branch + git checkout (or git switch) |
| Record a commit | git add then git commit |
| Send to the remote | git push |
| Fetch the team's updates | git pull (or git fetch) |
| Merge two branches | git merge |
These six commands cover 95% of daily Git usage. They are covered in detail, with exercises, in the Premium Git Course.
Remember in 30 seconds
- Repository = folder + history (the
.gitsubfolder). - Commit = a dated, signed snapshot of the project.
- Branch = a parallel line of evolution, free to create.
- Merge = combining two branches; Git handles the automatic cases and warns you about conflicts.
- Remote = an online mirror of the repository, hosted on GitHub/GitLab/Bitbucket.
Next: Real-world use cases →