|
Copy and rename detection isn't implemented yet for rebases: #47, but I wonder, is there any kind of workaround for when I want to rebase a commit which modifies a renamed file? For example: Is there any way to rebase in either direction, either moving |
Replies: 2 comments
|
You can use git to do the rebase:
Git handles rebasing over renames better. Adding a bookmark ensures jj abandons the original commits (you could just abandon them manually, but I think adding a temporary bookmark is easier). |
|
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 What the script does
|
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
jj op restore ...to get a clean state (useful for multip…