gg sc
Squash local changes into the current stack commit.
gg sc [OPTIONS]
Options
-a, --all: Include staged and unstaged changes-f, --force(alias--ignore-immutable): Override the immutability guard. By defaultgg screfuses to amend a commit whose PR is merged or which is already reachable fromorigin/<base>. See Core concepts · Immutable commits.
When unstaged changes are present, behavior is controlled by defaults.unstaged_action in .git/gg/config.json:
ask(default): prompt to stage all, stash, continue, or abortadd: auto-stage all changes (git add -A) and continuestash: auto-stash and continuecontinue: continue without including unstaged changesabort: fail immediately
Examples
# Standard amend-like flow
git add .
gg sc
# Include unstaged changes too
gg sc --all