A fork of github/gh-stack with fixes for rebasing stacks whose parents were rewritten. For usage and commands, see the upstream README and docs.
- Already-applied commits are dropped on rebase. If a branch was stacked on an older copy of its parent, conflicts on commits the new base already has (same patch, or same author, author date and subject) are resolved by keeping the base's side. Only conflicts in the branch's own commits stop the rebase.
- Rebase base recovery. When the old parent commit is gone, the rebase base is recovered from the branch's patch-equivalent copy of it.
- Force pushes don't discard others' commits. The pushed lease was the SHA fetched just before pushing, so
push,syncandsubmitoverwrote anything a reviewer pushed to a stack branch. Each branch's last pushed SHA is now recorded, and if the remote has commits since then that the local branch lacks (other than rewritten copies of your own commits, trunk commits, or merges), nothing is pushed and they are listed.--overwrite-remotepushes anyway. modifyaftersync --prune. Merged branches thatsync --prunedeleted are skipped when snapshotting the stack.
Requires gh and Git 2.36+.
gh extension remove stack 2>/dev/null # if upstream is installed
gh extension install gavinsan33/gh-stackUpgrade with gh extension upgrade stack. To switch back to upstream, remove it and run gh extension install github/gh-stack.
The update notifier only runs for upstream installs, so it won't prompt you to switch to upstream releases.
make install # build and link this checkout as the gh stack extensionSee CONTRIBUTING.md for tests.
MIT. See LICENSE.