Chris Deeming
11/19/2025, 2:52 PMmain branch, then we have a dev branch.
I have a dev/feature-1 branch which was made from the dev branch.
I then have additional work in dev/feature-2 and dev/feature-3.
Essentially dev > dev/feature-1 > dev/feature-2 > dev/feature-3
At the moment I have three PRs open, one to merge dev/feature-3 into dev/feature-2 another to merge dev/feature-2 into dev-feature-1 and then finally one to merge dev/feature-1 into dev.
Is it possible to create a stack from these three branches? I've tried a few things that I thought were correct but I'm a bit nervous.
The existing PRs that are open don't matter. I'm happy to close them and let Graphite recreate them. I guess I'm mostly confused about the right course of action when the work has essentially already been done. But there is more work to do so stacking what we have already makes a lot of sense, I think.Pylon
11/19/2025, 2:52 PMChris Deeming
11/19/2025, 2:53 PMPylon
11/19/2025, 3:05 PMgt init so you can initialize Graphite in this repository by selecting a trunk branch (i.e. dev).
Then you can checkout the dev/feature-3 branch and run gt track to start tracking it with Graphite and recursively track the rest of the stack of branches by specifying each branch’s parent interactively.
Once done you should be able to run gt ls to visualize your stack.Chris Deeming
11/19/2025, 3:08 PMdev/feature-3 supposed to be dev/feature-2 or is it supposed to be dev?Pylon
11/19/2025, 3:09 PMdev/feature-2. Then its parent is dev/feature-1 and its parent is trunk dev .Chris Deeming
11/19/2025, 3:14 PMfeature-3 is up to date with feature-2. I suspect I just need to do some rebases and get it to where it should be.Chris Deeming
11/19/2025, 4:04 PMgt ls
◉ dev/feature-3
◯ dev/feature-2
◯ dev/feature-1 (needs restack)
◯ dev
I'm not sure what needs restack means. I think I need to do a gt submit at some point, but I'm not sure, especially because I have PRs open for them (which were created some time ago manually through GitHub)Pylon
11/19/2025, 4:08 PMgt restack to ensure each branch in the current stack has its parent in its Git commit history, rebasing if necessary. If conflicts are encountered, you will be prompted to resolve them via an interactive Git rebase.