This message was deleted.
# how-do-i
s
This message was deleted.
a
Can you
gt split
based on commit and then
gt reorder
a
Potentially! But I don't really want that specific commit to be its own branch or PR. I just need to move it to the desired branch. Using
gt be
lets me move it in the correct direction but then not sure how to move it to another branch after that without using something like
git reset --hard <target commit>
to move the desired branch either to this commit or after this commit.
j
I think
undo
will solve most of the use case for this, but i've toyed with an idea for a command that does this in the past — candidly not sure when we'd be able to put it out though
I think it would be quite possible to script an extension to the CLI that does this though
a
Potentially! But I don't really want that specific commit to be its own branch or PR.
You can
gt fold
after the
gt reorder
👍 1
j
rough script to do this (you need fix my pseudo-bash shell parsing)
Copy code
# move-commit <a> <b>
# move top commit of <a> to <b>
gt co a
git reset --soft HEAD~
git stash
gt co b
git stash pop
gt modify -c
❤️ 1
a
That is pretty much what I end up doing, so totally makes sense to script it up!