GIT-STAGE-BATCH(1)

NAME
git-stage-batch - hunk-by-hunk and line-by-line staging for git

SYNOPSIS
git-stage-batch [-C PATH] [-i] [--version] [COMMAND [ARGS...]]

DESCRIPTION
git-stage-batch provides a command-oriented workflow for reviewing and staging git changes. It presents hunks, files, and batches as numbered review targets so changes can be included, skipped, discarded, saved for later, or moved between batches.

Session and repository compatibility state is maintained under .git/git-stage-batch/. Sessions can be stopped, resumed, undone, or redone while preserving enough state to keep later commands tied to the selected review.

HELP
The top-level help is an overview. Each public subcommand has its own manual page. For example:
    git-stage-batch include --help
    git help git-stage-batch-include

COMMON WORKFLOW

git-stage-batch start
    Start a review session and select the first hunk.

git-stage-batch show
    Show the selected hunk or open a file review.

git-stage-batch include
    Stage the selected hunk.

git-stage-batch skip
    Leave the selected hunk for a later pass.

git-stage-batch discard
    Remove the selected hunk from the working tree.

git-stage-batch again
    Start another pass over skipped hunks.

git-stage-batch stop
    Clear session state.

COMMANDS

  Session Commands

git-stage-batch-start(1)
    Start a new hunk review session.

git-stage-batch-show(1)
    Show the selected hunk, a file review, or a batch review.

git-stage-batch-status(1)
    Show current session progress.

git-stage-batch-again(1)
    Start a new pass over skipped hunks.

git-stage-batch-stop(1)
    Stop the current session.

git-stage-batch-abort(1)
    Undo all changes made during the session.

git-stage-batch-undo(1)
    Undo the most recent undoable session operation.

git-stage-batch-redo(1)
    Redo the most recently undone session operation.

  Change Commands

git-stage-batch-include(1)
    Stage selected changes, save them to a batch, or apply batch changes to the index.

git-stage-batch-skip(1)
    Mark selected live changes as skipped.

git-stage-batch-discard(1)
    Remove live changes, save them to a batch, or reverse batch changes.

git-stage-batch-apply(1)
    Apply batch changes to the working tree without staging them.

git-stage-batch-reset(1)
    Remove selected lines from a batch's record without changing the working tree.

  Batch Commands

git-stage-batch-new(1)
    Create a named batch.

git-stage-batch-list(1)
    List batches.

git-stage-batch-drop(1)
    Delete a batch.

git-stage-batch-annotate(1)
    Set a batch note.

git-stage-batch-sift(1)
    Remove already-present changes from a batch.

git-stage-batch-validate(1)
    Validate persisted batch metadata without modifying it.

  Other Commands

git-stage-batch-interactive(1)
    Run the continuous interactive interface.

git-stage-batch-block-file(1)
    Permanently exclude a file from future sessions.

git-stage-batch-unblock-file(1)
    Allow a blocked file to be reviewed again.

git-stage-batch-suggest-fixup(1)
    Suggest a commit to fix up with the selected hunk.

git-stage-batch-install-assets(1)
    Install bundled assistant assets into the repository.

git-stage-batch-journal(1)
    Locate, summarize, or purge private diagnostic journal data.

LINE IDS
Line-oriented commands accept comma-separated IDs and ranges such as 1, 1,3,5, or 1,3,5-7. Displayed IDs are review IDs, not necessarily source file line numbers.

FILE SCOPES
Commands that accept --file may take a path or may omit the path to use the selected file. Commands that accept --files resolve gitignore-style patterns, including ordered ! exclusions, to one or more changed files.

AUTOMATIC HUNK SELECTION
Hunk actions normally select and display the next hunk after they complete. Use --no-auto-advance on an action command to leave no hunk selected. Use --auto-advance to opt back in for one command. The start and again commands can set the session default.

BATCHES
Batches are named collections of changes stored under git refs. They allow changes to be saved, reapplied, discarded, reset, or transformed later. Most users can use include, skip, and discard without using batches.

AUTHOR
Written by Ray Strode.

REPORTING BUGS
Report bugs at: https://github.com/halfline/git-stage-batch/issues

COPYRIGHT
Copyright © 2025-2026 Ray Strode.
License: MIT

SEE ALSO
git(1), git-add(1), git-stage-batch-start(1), git-stage-batch-show(1), git-stage-batch-include(1), git-stage-batch-skip(1), git-stage-batch-discard(1), git-stage-batch-status(1), git-stage-batch-journal(1)