If you are just getting started with Git, you have probably come across the mysterious words:
🟡 staged
🔴 unstaged
And they sound like you should have taken some secret course... But don't worry! Now we'll explain it in simple terms, what it means — and why you need it 😺
🧶 Imagine: you have a box with a project
Let's say you're working on a website. The project folder contains a bunch of files: index.html, style.css, script.js, etc.
You opened style.css and changed the button color to red. Git is like this:
🟡 “Okay, you changed something... But for now I'm just noticed this. I won't commit it until you tell me to.”
This state is unstaged. Git knows that the file has been modified, but does not prepare it for preservation.
🧾 Now tell Git: "Remember this one"
You enter the command:
git add style.cssNow Git responds:
✅ “Accepted! I've memorized this file. It's ready for a commit.”
And now style.css is already staged, that is “prepared for commit”.
📸 What is a commit?
Commit is like 📷 photo of your project at the moment. Only this photo gets only staged files.
If the file is in the unstaged status, it will not be included in the commit, even if you changed it.
🔄 Once again, in simple terms:
Status | What does it mean | Will it get into the commit? |
|---|---|---|
unstaged | File modified, but Git did not remember | ❌ No |
staged | Git is ready to save changes | ✅ Yes |
🧠 Remember by analogy
Imagine you're an actor 🎭:
You're rehearsing a scene at home → Git knows you're preparing (
unstaged)You go to the rehearsal before the director → you
staged, ready to performPremiere, performance, commit → you will be seen by the audience, you are officially in the history of the project
🧪 Example in the terminal
echo "h1 {color: red}" >> style.css # changing the file
git status # Git: file modified (unstaged)
git add style.css # preparing file
git status # Git: staged file ✅
git commit -m "Header color changed" # create a commit
In the attachment Code we teach Git in practice — with examples, step by step.
📦 Git is not scary if you explain it correctly. And that's exactly what we do 🐾
