-
-
Notifications
You must be signed in to change notification settings - Fork 89
Replies: 1 comment · 4 replies
-
Presumably, it only fails if you are not currently at the last commit in the stack when you run
Yep, I think that's the best way at present. Alternatively, you can first jump to the last commit in the stack and use
Assuming I understand the problem correctly, I think the best command would be an equivalent to
Sure, feel free to either implement the command (😉) or write up a page on the Wiki. I think the "Inserting a commit in between other commits" link in the sidebar (which links to this discussion) addresses the same workflow, but it might not be obvious if your mental model is about "reordering" commits. |
Beta Was this translation helpful? Give feedback.
All reactions
-
It doesn't work for me at the end of the stack either. I frequently run into an issue where I get a bunch of abandoned branches, a prompt to run
git-branchless clearly understands that the branches are pointers to rewritten commits but it just can't restack: Software versiongit-branchless 0.7.0-rc.1 (fb0265e) Operating systemmacOS 12.6 (Darwin 21.6.0) Command-line/Users/anorbauer/.cargo/bin/git-branchless bug-report Environment variablesSHELL=/bin/zsh
EDITOR=<not set> Git version
HooksShow 7 hooksHook
|
Beta Was this translation helpful? Give feedback.
All reactions
-
If you try to restrict the restack operation to just your draft commits with |
Beta Was this translation helpful? Give feedback.
All reactions
-
Oh neat, |
Beta Was this translation helpful? Give feedback.
All reactions
-
That should probably be the default. There was a time when we marked "anomalous" commits (public commits which had been rewritten), but this was never useful, so we got rid of it. Likewise, we also never want to restack public commits, and it just causes the kind of error message that you see. |
Beta Was this translation helpful? Give feedback.
-
I sometimes want to reorder commits, e.g. I make a new commit and a new branch at the end of my stack but later decide I want it higher in the stack.
git-branchless does NOT get the branch pointers correct if I try to
git rebase -i
.git-branchless move
DOES work though. It's very unintuitive to reach formove
when I'm re-ordering commits, even when I know--insert
is a thing. So my questions are:To transpose 2 and 3, I would do
git-branchless move -x branchC -d branchA --insert
which would produce:Is that the best way of accomplishing this?
2. If it is, should re-ordering of commits be a higher-level command?
3. If we don't want a new command, should I document using
git-branchless move
to accomplish this workflow in a new page under Workflows in the wiki?Beta Was this translation helpful? Give feedback.
All reactions