-
Is there an easy way to move patches from one branch (or "stacks") to another? Sometimes I want to split the feature I'm working on, and for now I've done that with creating a new branch at the top of the stack, uncommitting all on that stack (so I have two of the same stacks), and then modifying both. It feels a bit unwieldy though. How do others do this? Would a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The following script is helpful for me. Here's the workflow:
#!/usr/bin/env bash
set -euo pipefail
top=$(stg top)
newbranch=${1:-${top/-/'/'}}
curbranch=$(stg branch)
set -x
stg branch -C "$newbranch"
stg delete -U
stg branch "$curbranch"
stg delete "..$top"
stg rebase "$newbranch"
stg branch "$newbranch" After the script runs, a new branch exists with only the selected (applied) patches and For PR/MR workflows, the newly created branch is ready to be pushed. And development of work-in-progress patches on W.r.t. the workflow you describe, not sure if you know about |
Beta Was this translation helpful? Give feedback.
The following script is helpful for me. Here's the workflow:
After the script runs, a new branch exists with only …