Pushing a series to a branch #1470
Replies: 2 comments 1 reply
-
In most cases, I use Normally, I use I'm not sure if I understand your workflow fully; do you intend to cherry-pick the commits every time you want to re-push, or just for the initial push? If every time, you may find a tool like You may also find the Jujutsu "mega-merge" workflow useful, since then you can keep your individual branches separate to begin with, but also have their contents merged in the working copy for development. Unfortunately, in git-branchless, there's currently no way to programmatically cherry-pick the range and address the resulting commits:
There might be a workaround in your case where you run something like $ git test run -s worktree && -x 'git rebase X Y --onto main && git push origin @:some-branch The design for (If you can work out a command that can determine the root or head commit for a range automatically, perhaps using |
Beta Was this translation helpful? Give feedback.
-
Thanks for your thoughtful reply, it's taking me a while to fully process all of it.
Essentially, I clone a remote repository and do some work and create multiple commits. I now have five consecutive commits, but they need to be submitted as four different branches to create four different merge requests. If I had to use git send-email 84db4c..94dec
git send-email 834fda..a938c
... But when it comes to GitHub (and its clones), I need to create a branch for each series, and then cherry-pick individual commits into each one. I'd instead want to do Perhaps I'm asking the wrong question here though: how would you deal with such a situation?
The Are you using Why do you need to specify X would typically be I was unfamiliar with the
This should be just |
Beta Was this translation helpful? Give feedback.
-
TLDR: I want to push
84db4c..94dec
toorigin
under a new branch namedsomething
.When working on changes locally, I often need to push individual commits (or series of commits) into their own branches, so that I can open a single MR for each of them.
This requires several manual steps:
These steps need to be repeated for each commit/series.
I'm in need of something like
git send-branch origin 84db4c..94dec:something
, which would push that series into branchsomething
. I don't care if the branchsomething
is left over locally or not.I've been reading through the wiki, and it would seem that the mindset with which this project was written is close to my own. But I don't see a way of doing that I'm trying to do.
Is there some way to do this with
git-branchless
? How do you deal with this sort of scenario?Beta Was this translation helpful? Give feedback.
All reactions