Commands
dub modify
Amend or create commits on the current branch, then automatically restack descendants.
Usage
# Amend current commit
dub modify
# Create a new commit
dub modify -c -m "fix: ..."
# Interactive staging
dub modify -p
# Stage all tracked updates
dub modify -u
# Show staged diff before modify
dub modify -v
# Show staged + unstaged diff before modify
dub modify -vv
# Interactive rebase of this branch's commits
dub modify --interactive-rebaseFlags
| Flag | Description |
|---|---|
-a, --all | Stage all changes |
-u, --update | Stage tracked-file updates |
-p, --patch | Interactive hunk staging |
-c, --commit | Create a new commit instead of amending |
-e, --edit | Edit the commit message |
-m, --message <msg> | Commit message (repeatable) |
-v, --verbose | Show diff before modify (repeatable: -vv for staged+unstaged) |
--interactive-rebase | Interactive rebase of branch commits |
Aliases: dub m
Common Patterns
Address review feedback on a middle branch:
# Jump to the branch
dub co feat/auth-login
# Edit files, then amend + restack descendants
dub m -a -m "fix: address review feedback"
# Push updates
dub ss