{}const=>[]async()letfn</>var
DevelopmentBasics

What is staged and unstaged in Git — explained in simple words

We understand how Git tracks changes: what is staged, unstaged and how to work with it. Useful for beginners!

К

Kodik

Author

2 min read

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.

🔥 100,000+ students already with us

Tired of reading theory?
Time to code!

Kodik — an app where you learn to code through practice. AI mentor, interactive lessons, real projects.

🤖 AI 24/7
🎓 Certificates
💰 Free
🚀 Start learning
Joined today

🧾 Now tell Git: "Remember this one"

You enter the command:

git add style.css

Now 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 perform

  • Premiere, 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 🐾

🎯Stop procrastinating

Liked the article?
Time to practice!

In Kodik, you don't just read — you write code immediately. Theory + practice = real skills.

Instant practice
🧠AI explains code
🏆Certificate

No registration • No card