Implement but stack#12000
Open
imskr wants to merge 1 commit intogitbutlerapp:masterfrom
Open
Conversation
|
@imskr is attempting to deploy a commit to the GitButler Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
Hello 👋🏻 @krlvi, I've created this for |
Byron
requested changes
Jan 24, 2026
Collaborator
Byron
left a comment
There was a problem hiding this comment.
HI! Thanks for giving it a shot!
Since I took a glimpse already, please let me point out a couple of things to be changed for the PR to have a chance to be merged. It would probably also be broken up into smaller pieces.
- analysis/scope - what does it mean to
stacka branch. The original instruction "Something like but stack that rebases my branch onto another into a stacked branch" isn't enough to get going here. - implement stacking in
but-workspaceand test it to death - wire it up in
but(CLI) with a couple of tests for typical user interaction
I recommend closing this PR and doing a detailed analysis in the respective issue.
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧢 Changes
but stackcommand to stack one branch onto anotherstack_branch_onto_targetfunction that removes and recreates a branch with a new anchor☕️ Reasoning
The
but stackcommand provides a way to reorganize branch hierarchies by changing which branch another branch is stacked on top of. This is useful when you want to reorder your work or change dependencies between branches. The implementation safely removes the old branch reference while preserving its metadata, then recreates it with the target branch as its new anchor point. The validation ensures we don't create invalid states like anonymous stacks or circular dependencies.🎫 Affected issues
Fixes: #11318