git-stage
Add file content to the staging area
TLDR
View documentation for the original command
SYNOPSIS
git stage [options]... [--] [pathspec…]
PARAMETERS
-A, --all
Stage all changes (new, modified, deleted) in the entire working tree.
-u, --update
Stage modified and deleted tracked files only (ignores untracked).
--interactive, -i
Run interactive mode to select files or hunks to stage.
--patch, -p
Interactively choose hunks of patch to stage.
-n, --dry-run
Show what would be staged without actually staging.
-v, --verbose
Report added files verbosely.
-f, --force
Allow staging otherwise ignored files.
-N, --intent-to-add
Record intent to add a file without staging its content.
--ignore-missing
Ignore pathspecs that do not exist.
--chmod=(+|-)x
Override executable bit when staging.
--renormalize
Re-scan for line ending normalization.
--sparse
Allow updating index for sparse-checkout.
DESCRIPTION
git stage adds changes from the working directory to Git's staging area (index), preparing them for the next git commit. Although not an official Git subcommand, it is frequently used as a user-defined alias for git add (e.g., alias gitstage='git add') in shell profiles like .bashrc or .zshrc. Tutorials and GUIs often refer to this action as 'staging'.
The staging area acts as an intermediate step, allowing selective inclusion of changes. Unstage with git restore --staged or git reset. View staged changes via git status or git diff --cached.
Key benefits include building commits incrementally, ignoring whitespace-only changes, or staging specific hunks. For new files, staging records them; for modified, it snapshots current state. Deleted files can be staged with appropriate options. Interactive modes enable precise control, ideal for complex changesets.
Common workflow: edit files, git stage selected ones, review with git status, commit.
CAVEATS
Not a standard Git command; equivalent to git add. Does not commit changes—use git commit. May stage unintended files without pathspec; always review with git status.
EXAMPLES
git stage README.md
Stage single file.
git stage -p
Interactively stage hunks.
git stage -A
Stage all changes.
ALIAS SETUP
Add to ~/.bashrc: alias gitstage='git add'
Reload shell or source ~/.bashrc.
HISTORY
Staging via git add core since Git 1.0 (2005, Linus Torvalds). Index concept from early BitKeeper influences. Aliases like 'git stage' popularized in user workflows and tools like GitHub Desktop.


