Glossary

Staging area

Git's waiting room: the changes you have chosen to include in the next commit.

In plain words

The staging area is a list of changes you have picked for your next commit. You add files to it with git add, then git commit saves exactly what is staged, nothing more.

Why it exists

It lets you choose. Say you fixed a bug and also started a new feature in the same afternoon. You can stage only the bug fix files and commit them alone, with a clear message, then commit the feature separately later.

A picture

Think of packing a parcel. Your working folder is your desk with everything on it. The staging area is the box: you choose what goes in. The commit is sealing and labelling the box.

git add index.html
git status

git status shows staged changes in green under "Changes to be committed".

See Your first commit, explained.

Found this useful?

Every lesson stays free. Tap the thumbs up so we know what works, or say thanks with a soda or a coffee: it pays for hosting and new lessons.

Buy me a sodaBuy me a coffee

Want more on this?

Tell us which part was not clear, ask for a follow-up lesson, or request a lesson on any topic. We read every request.

I would like
Only to tell you when it is ready.

WhatsApp

Join the channelChat with us

Free lessons and updates in the channel. Questions about learning or training? Chat with us.