SOLFIND
Web Lens
Portal home

Use other tools with stacked pull requests - GitHub Docs

https://docs.github.com/en/pull-requests/reference/use-other-tools-with-stacked-pull-requests • 141 KB fetched
Open original page


Use other tools with stacked pull requests - GitHub Docs Skip to main content GitHub Docs Version: Free, Pro, & Team Search or ask Copilot Search or ask Copilot Select language: current language is English Search or ask Copilot Search or ask Copilot Open menu Collapse sidebar Expand sidebar Scroll breadcrumbs left * Home * Pull requests * Reference * Stacked PRs and other tools Scroll breadcrumbs right Pull requests * * * Get started * About pull requests * About stacked PRs * About forks * Pull request quickstart * Stacked PRs quickstart * Review quickstart * Concepts * Write code * Help others review your changes * Give reviews * Resolve reviews * Deploy code * How-tos * Commit changes * Manage branches * Commit to PR branch from fork * Create a commit with multiple authors * Change a commit message * Compare commits * Troubleshoot commits * Create pull requests * Create a pull request * Create stacked PRs * Create a PR from a fork * Draft pull requests * Manage stacked PRs * Update the head branch * Change the base branch * Request a PR review * Stacked pull requests * Review pull requests * Check out a PR locally * Review proposed changes * Review stacked PRs * Review dependency changes * Comment on a PR * Approve PRs * View a PR review * Dismiss a PR review * Incorporate feedback * Merge and close * Resolve merge conflicts * Resolve merge conflicts in Git * Troubleshoot status checks * Troubleshoot stacked PRs * Merge a pull request * Merge PR with merge queue * Merge PR automatically * Merge stacked PRs * CI for stacked PRs * Revert a pull request * Close a pull request * Work with forks * Fork a repository * Configure a remote repository * Sync a fork * Allow changes to a branch * Detach a fork * Reference * Pull requests * Stacked pull requests * Stacked PRs CLI commands * Stacked PRs APIs and webhooks * Branches * Forks * Commits * Stacked PRs and other tools * Using query parameters to create a pull request * PR reviews * Status checks * Pull request merges * Merge conflicts * Manage and standardize pull requests * Tutorials * Stack pull requests * Roll out stacked PRs Use other tools with stacked pull requests Use stacked pull requests with tools like Jujutsu, Sapling, or git-town. Copy as Markdown In this article * Linking branches as a stack * Adding to an existing stack * Setting a base branch or opening pull requests * Adopting branches for full local tracking * Further reading Note This feature is in public preview and subject to change. Stacked pull requests are built on standard Git branches and regular pull requests, so you can choose to use tools other than the gh stack CLI for your local workflow. If you manage branch chains with another tool, such as Jujutsu (jj), Sapling, or git-town, you can use the gh stack link command to open those branches as a stack on GitHub. The gh stack link command only calls the GitHub API to create the stacked pull requests — it does not create any local tracking. If a branch already has an open pull request, link uses it; otherwise it creates a draft pull request with the correct base branch. Linking branches as a stack * Create your chain of branches locally with your tool of choice. For example, with Jujutsu: jj new main -m "first change" jj bookmark create change1 --revision @ jj new -m "second change" jj bookmark create change2 --revision @ jj new -m "third change" jj bookmark create change3 --revision @ * Push the branches and link them as a stack, listed from bottom to top. gh stack link change1 change2 change3 This pushes the branches, creates a pull request for each one with the correct base, and links them as a stack on GitHub. Adding to an existing stack To add more branches to a stack you created with link , run gh stack link again with the full list of pull requests and branches in the stack, from bottom to top. You can refer to existing pull requests by number. gh stack link 123 124 125 change4 change5 Setting a base branch or opening pull requests By default, link targets your repository's default branch and creates draft pull requests. To change this behavior: * Use --base to specify a different trunk branch. * Use --open to mark the pull requests as ready for review instead of draft. gh stack link --base develop --open change1 change2 change3 Adopting branches for full local tracking If you want full local stack tracking — so you can use commands like gh stack rebase , gh stack sync , and stack navigation — adopt your existing branches with gh stack init instead, then submit them. gh stack init change1 change2 change3 gh stack submit Further reading * Stacked pull requests Back to top Help and support Was this Doc helpful? Yes No Help us make GitHub Docs great! All Docs are open source. See something that's wrong or unclear? Submit a pull request. Make a contribution Still need help? Ask the GitHub community Contact support Expert services Blog GitHub Inc. © 2026 Terms Privacy Status Pricing

Links found on this page

  1. Skip to main content [direct]
  2. GitHub Docs [direct]
  3. Pull requests [direct]
  4. Reference [direct]
  5. About pull requests [direct]
  6. About stacked PRs [direct]
  7. About forks [direct]
  8. Pull request quickstart [direct]
  9. Stacked PRs quickstart [direct]
  10. Review quickstart [direct]
  11. Write code [direct]
  12. Help others review your changes [direct]
  13. Give reviews [direct]
  14. Resolve reviews [direct]
  15. Deploy code [direct]
  16. Manage branches [direct]
  17. Commit to PR branch from fork [direct]
  18. Create a commit with multiple authors [direct]
  19. Change a commit message [direct]
  20. Compare commits [direct]
  21. Troubleshoot commits [direct]
  22. Create a pull request [direct]
  23. Create stacked PRs [direct]
  24. Create a PR from a fork [direct]
  25. Draft pull requests [direct]
  26. Manage stacked PRs [direct]
  27. Update the head branch [direct]
  28. Change the base branch [direct]
  29. Request a PR review [direct]
  30. Stacked pull requests [direct]
  31. Check out a PR locally [direct]
  32. Review proposed changes [direct]
  33. Review stacked PRs [direct]
  34. Review dependency changes [direct]
  35. Comment on a PR [direct]
  36. Approve PRs [direct]
  37. View a PR review [direct]
  38. Dismiss a PR review [direct]
  39. Incorporate feedback [direct]
  40. Resolve merge conflicts [direct]
  41. Resolve merge conflicts in Git [direct]
  42. Troubleshoot status checks [direct]
  43. Troubleshoot stacked PRs [direct]
  44. Merge a pull request [direct]
  45. Merge PR with merge queue [direct]
  46. Merge PR automatically [direct]
  47. Merge stacked PRs [direct]
  48. CI for stacked PRs [direct]
  49. Revert a pull request [direct]
  50. Close a pull request [direct]
  51. Fork a repository [direct]
  52. Configure a remote repository [direct]
  53. Sync a fork [direct]
  54. Allow changes to a branch [direct]
  55. Detach a fork [direct]
  56. Pull requests [direct]
  57. Stacked pull requests [direct]
  58. Stacked PRs CLI commands [direct]
  59. Stacked PRs APIs and webhooks [direct]
  60. Branches [direct]
  61. Forks [direct]
  62. Commits [direct]
  63. Using query parameters to create a pull request [direct]
  64. PR reviews [direct]
  65. Status checks [direct]
  66. Pull request merges [direct]
  67. Merge conflicts [direct]
  68. Manage and standardize pull requests [direct]
  69. Stack pull requests [direct]
  70. Roll out stacked PRs [direct]
  71. Make a contribution [direct]
  72. Ask the GitHub community [direct]
  73. Contact support [direct]
  74. Expert services [direct]
  75. Blog [direct]
  76. Terms [direct]
  77. Privacy [direct]
  78. Status [direct]
  79. Pricing [direct]