Version: | git-ps 0.1 |
---|---|
Date: | 2023-12-19 |
Manual section: | 1 |
git ps new [<name>]
git ps switch [<name>]
git ps delete [-f]
git ps list
git ps log
git ps show <id-or-range> [<id-or-range>...]
git ps todo <description>
git ps isolate <id-or-range> [<id-or-range>...]
git ps integrate
git ps pick <id>
git ps rebase [-i] [<branch>]
git ps pull
- new [<name>]
- Creates a new patch stack on top of the current branch. If no <name> is given, the default is to name it after the current branch.
- switch [<name>]
- Switches to the named patch stack (or the default stack for the current branch).
- delete [-f]
- Deletes the current patch stack. The
-f
option is required if the stack is not fully integrated to its upstream. - list
- Lists all patch stacks in the current repository.
- log
- Lists the patches on the current stack, along with information about merged/unmerged upstream commits.
- show <id-or-range> [<id-or-range>...]
- Displays the changes made by the specified patch.
- todo <description>
- Adds an empty commit to the top of the stack with the provided message.
- isolate <id-or-range> [<id-or-range>...]
- Switches to a detached patch stack with only the given commit(s) applied on top of the base branch.
- integrate
- Merges the current patch stack into the upstream branch. To merge only a
portion of a stack, use
git ps isolate
first. - pick <id>
- Moves the specified patch to the top of the stack (e.g. for amending).
- rebase [-i] [<branch>]
- Rebases the current patch stack on top of any new commits in its upstream.
Pass
-i
to rebase interactively. If a branch is specified, the stack will be rebased onto it instead, and it will be set as the new upstream. - pull
- Runs
git pull
on the upstream branch and thengit ps rebase
on the current patch stack.
Patch stacks are implemented as branches which have an upstream configured separately from the usual git configuration (to prevent git-push(1) from merging unfinished patches). The intended workflow is as follows:
- Create a patch stack with
git ps new
. The stack will have a name likemain%ps
.- Add and manipulate patches as normal commits.
- If needed, reorder patches using
git ps rebase -i
or edit the top patch withgit commit --amend
.- Fetch and rebase onto the latest upstream using
git ps pull
or rebase the patch stack independently withgit ps rebase
.- Test a patch or set of patches using
git ps isolate
.- If the patches are ready, merge the isolated stack into the upstream branch with
git ps integrate
; otherwise, return to the patch stack withgit switch
.
git-rebase(1)
Devin J. Pohly