Urgent.News

What's breaking now, across thousands of outlets.

Tech

GitHub Stacks in Jujutsu

On 2026-07-30, GitHub released its stacked pull request (PR) feature into public preview, targeting git users but also providing documented support for other git-compatible version control systems like Jujutsu (jj). This article serves as a primer for using GitHub stacks with jj, reusing some jj aliases and revset aliases defined in a previous article.

GitHub's stacked PRs require every PR to have a jj bookmark (git branch), necessitating the creation of numerous bookmarks. Currently, UI tools will not automate this process, but users can learn jj aliases to manage these bookmarks easily. The article explains how to customize the behavior of the bookmark-advance-to revset by overriding it, allowing users to advance the bookmark to a code commit below a commit with new code.

The gh stack CLI offers several subcommands, primarily managing or consuming local tracking of the stack in a jj repo. Users will primarily use the few subcommands that manage the remote stack on GitHub, such as link, push, etc. To create a bookmark for each commit in the stack, users upload their bookmarks to GitHub, create draft PRs for each, and link them into a stack. Alternatively, users can link the entire stack by going to the top where the stack and substack are the same thing.

It's important to note that users cannot add to the middle of a stack, as this will result in an error stating that new PRs must be added to the top of the existing stack. Therefore, users must delete their stack and recreate it. Assuming the new commit is change id abc, users must delete their stack and recreate it. Additionally, deleting the remote branch closes its PR, so users should delete the branch before re-running gh stack link to avoid closing the PR above the removed branch.

Unstacking, while theoretically possible, is complicated and should be done from the web UI instead. There are likely ways to improve these workflows, but the article emphasizes that as it stands, the feature works reasonably well. The author expresses excitement about the potential of PR stacks in GitHub and acknowledges the room for improvement.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at alan.norbauer.com →

More in Tech

Path Traversal

What is path traversal?? Path traversal is also know as directory traversal. These vulnerabilities enable an attacker to read arbitrary files on the server that is running an application.

More from Thursday 13 August →