Guide
Drew De Ponte edited this page Sep 16, 2021
·
6 revisions
Clone this wiki locally
The goal of this document is to provide a reference document describing the various activities people would want to perform within the Git Patch Stack Workflow and provide examples of each. Ex: I want to “Add code to an existing commit”, “Rework an existing commit description”, “Add a new patch on top of the stack”, “Publish my patch to upstream”, etc.
Create a new patch on top of the stack
git commit
See my current stack of patches
git ps ls
Request review of a patch in my stack
git ps rr <patch-index>
Modify the top most patch on your stack
- stage whatever changes you want to include in your top most patch (
git add [-p]) - amend the top most patch via the following command (
git commit --amend)
Rework an existing commit’s description
git ps rebase
# mark the commit you want to reword with "r"
Split an existing commit up into multiple commits
https://drewdeponte.com/blog/git-splitting-commits/
Throw a patch away
git ps rebase
# mark the commit you want to drop with "d"
Combine (squash/fixup) a patch into another patch
git ps rebase
# mark the commit you want to squash/fixup with "s" or "f" respectively
Reorder patches in my stack
git ps rebase
# reorder the commits to be the order you want
Publish an approve patch upstream
git ps pub <patch-index>