{"repo":"github/gh-stack","free":true,"listed":false,"github":"https://github.com/github/gh-stack","clone":"git clone https://github.com/github/gh-stack.git","description":"GitHub Stacked PRs","language":"Go","stars":1312,"topics":["cli","gh-extension","github","stacked-prs"],"license":"MIT","category":"cli-tools","readme_excerpt":"GitHub Stacked PRs A GitHub CLI extension for managing stacked branches and pull requests. Stacked PRs break large changes into a chain of small, reviewable pull requests that build on each other. gh stack automates the tedious parts — creating branches, keeping them rebased, setting correct PR base branches, and navigating between layers. Installation Requires the GitHub CLI ( gh ) v2.0+. AI agent integration Install the gh-stack skill so your AI coding agent knows how to work with stacked PRs and the gh stack CLI: Quick start How it works A stack is an ordered list of branches where each branch builds on the one below it. The bottom of the stack is based on a trunk branch (typically main ). The bottom of the stack is the branch closest to the trunk, and the top is the branch furthest from it. Each branch inherits from the one below it. Navigation commands ( up , down , top , bottom ) follow this model: up moves away from trunk, down moves toward it. When you submit, gh stack creates one PR per branch and links them together as a Stack on GitHub. Each PR's base is set to the branch below it in the stack, so reviewers see only the diff for that layer. Local tracking Stack metadata is stored in .git/gh-stack (a JSON file, not committed to the repo). This tracks which branches belong to which stack and their ordering. Rebase state during interrupted rebases is stored separately in .git/gh-stack-rebase-state . Commands gh stack init Initialize a new stack in the current reposito","default_branch":null,"files":null,"tree":[],"storefront":"/r/github","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/github/gh-stack/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}