Skip to content

Inserting a new merge commit between a commit and all its descendants? #5416

Answered by jennings
kwiberg asked this question in Q&A
Discussion options

You must be logged in to vote

You can probably do it in fewer commands:

# Insert the new commit between C and its descendants
jj new -A C

# Now we're editing this new commit
# Prepend `main` as an additional parent.
jj rebase -s @ -d main -d all:@-

I don't know if there's a way to do this in one command.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@kwiberg
Comment options

@kwiberg
Comment options

Answer selected by kwiberg
Comment options

You must be logged in to vote
3 replies
@kwiberg
Comment options

@kwiberg
Comment options

@martinvonz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants