Skip to content
Discussion options

You must be logged in to vote

I had to do this for a rather complex megamerge (7 branches, each with multiple commits). I had claude write a script that worked eventually, at least after spending $8 of my employer's tokens. To save you the effort, here's what we wrote.

This process keeps the change IDs of the original commits (unlike a regular git rebase) but does not preserve any merge structure; you need to recreate your megamerges afterwards. Sorry this is a total mess but hopefully it helps someone. And definitely backup your repo before running it, it worked for me but this is AI-generated code so it may explode catastrophically!!

What the script does

  1. Run jj op restore ... to get a clean state (useful for multip…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by anka-213
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