How to Stage Changes in Git (git add)
git add moves changes from your working directory into the staging area, marking them to be included in the next commit.
Published September 27, 2026
git add moves changes from your working directory into the staging area, marking them to be included in the next commit.
Key points
- git add file.txt stages a single file; git add . stages every change in the current directory and below
- Staging lets you build a commit from only part of your changes, rather than committing everything at once
- git add -p opens an interactive mode to stage specific hunks within a file rather than the whole file
Example
git add src/app.js