staging area
The Git staging area, where you select which changes to include in the next commit before permanently recording it.
In plain terms
Imagine you are moving and packing boxes. Everything in the apartment is scattered, but you do not throw everything into the truck at once: first, you prepare in the hallway what is going in this shipment. The hallway is the staging area: what is there is ready to go, while what remains in the room is still waiting.
In the version control system called Git, a programmer's work consists of saves (commits), which are like snapshots of the project's state. The staging area lets you decide what goes into the snapshot. If you fixed a bug and rewrote a text simultaneously, you can save them separately, making it clear later why each change was made.
This is what makes Git different from a text editor's 'Save' button: there, everything is saved at once; here, there is an intermediate step where you can select and review what you are recording.
How it works
- You are working on files on your own machine; these changes currently exist only in your working directory. Git sees them but has not recorded them.
- With the "git add" command you choose which files, or even which lines within a file, go into the staging area.
- Git takes snapshots of these and maintains an internal file called an index to track what is ready to be saved.
- 'git status' shows what is staged and what is not; if you change your mind, you can revert anything without losing your work.
- The 'git commit' command turns staged content into a final save, resetting the area to match the last save so you can start the next cycle.
An everyday example
You ask a coding agent to fix a bug on your website, and at the end you see: "3 files staged, 2 files not staged". This means the agent put three files into the next commit, touched the other two as well but did not stage them, so it is worth checking why.
Who is affected
A common misconception
Limits and risks
- If you modify the file after preparation, the previous version is saved unless you add it again.
- With commands that add everything at once, something that should not be there easily slips in: a password, personal data, or a large file.
- It exists only on your machine, so it is neither a backup nor a way of sharing.
- When using a coding agent, review what it prepared, because you are responsible for the final save, not the agent.
Similar, but not the same
- commit – A commit is the final, history-recorded save; the staging area is only the selection before it.
- test environment (staging environment) – It is a test server where software is tried out before going live; apart from the similar name, it has nothing to do with Git's staging area.
- git stash – The stash sets aside unfinished work so you can start fresh, while the staging area prepares the next save.
Related concepts
git add, partial preparation
A brief history
Git was created by Linus Torvalds in 2005 for Linux kernel development, and the index has been part of it from the start. The solution, internally called index and formerly cache, later became widely known by the more understandable term 'staging area'.
Where things stand
By the end of 2026, Git is the almost sole version control system in software development, so the staging area is part of every developer's basic vocabulary. Coding agents also use it to prepare their saves (commits), so the term is no longer met only by programmers.
In the news
- Hungarian user Vera Mérő sought weight-loss help and received life-threatening advice from an AI chatbotNov 3, 2026 · Health
- GitHub Copilot Fusion picks models automatically; local preview runs only partly on-deviceNov 2, 2026 · Code
- DARPA backs project to measure AI energy use at every stage of the workflowOct 31, 2026 · Ipar
- Google unveils Gemini 4 Carbon flagship model with a focus on cybersecurityOct 28, 2026 · Agent Age
- Demand for AI skills in Singapore more than triples; Singtel's NCS to triple its AI specialistsOct 26, 2026 · Work & HR
- IVSZ AI Maturity Index: about a third of Hungarian SMEs judge AI impact by feel aloneOct 26, 2026 · Code
- Gemini 4 models in coding rankings: Carbon second, Argon trails on Android testOct 26, 2026 · Code
- Another Chinese carmaker reportedly eyes Hungary, as BYD builds a plant in SzegedOct 23, 2026 · Ipar
Also known as
staging area · index · Git index · stage · staged changes · cache · preparation area · staging
Sources
- Pro Git book – Getting Started: What is Git? (the three states)
- Git documentation – git-add
- Wikipedia – Git
This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.