gg rebase
Rebase the current stack onto an updated branch.
gg rebase [TARGET]
- If
TARGETis omitted, git-gud uses the stack base branch.
Options
-f, --force(alias--ignore-immutable): Override the immutability guard. Rebase rewrites the parent of every commit in the stack; merged commits (including squash-merged PRs) and commits already reachable fromorigin/<base>are silently skipped โgit rebasedrops them automatically via patch-id matching, so--forceis not required for these. See Core concepts ยท Immutable commits.
Examples
# Rebase onto configured base
gg rebase
# Rebase onto specific branch
gg rebase main