gitbutlerapp / gitbutler

The GitButler version control client, backed by Git, powered by Tauri/Rust/Svelte
https://gitbutler.com
Other
13.15k stars 521 forks source link

[feature] Change target branch for specific virtual branches #4843

Open meetmangukiya opened 1 month ago

meetmangukiya commented 1 month ago

Opening to express interest in a new feature for having different target branches for specific virtual branches instead of just one global target branch for all virtual branches.

Byron commented 1 month ago

Thanks a lot for reporting!

I thought that there is an issue already but couldn't find it, however, found a related one about pushing to a different remote than pulling.

estib-vega commented 2 weeks ago

Hey @meetmangukiya 👋

Could you elaborate a bit more on what you would like to do and the how the workflow looks like?

Currently you should be able to set a remote (that's different to the base branch) for each of the virtual branches and push to it. Would that already cover what you need, or do you want to open PRs to different remote branches for different virtual branches?

meetmangukiya commented 2 weeks ago

I think it is somewhat covered by the following in that the user can unapply current virtual branches and change the target branch from setting and then work off it to target that. But I don't think the virtual branches are associated with the selected target branch. After switching the targets if I apply a virtual branch that was targetting another it'll still attempt to apply it. Which should be possible, but I think each virtual branch can generally be associated with a single target branch and a single remote branch. image

What would also be helpful is being able to switch the target here directly with a dropdown and when you select another target, the workspace and currently applied branches also switches. So basically I'd be able to have work on multiple virtual branches that target different target branches. Just multiplex the current flow.

image