GitHub merge and rebase creates a new commit ID causes divergent changes and jj git fetch #7848
-
|
Wondering how the community handles merging using jj with GitHub? I'm trying jj out and have a question on the following workflow:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
If you delete the branch in GitHub using the "delete branch" button on the PR page after merging the PR, then Otherwise, if you do have another branch on top of the rebased branch, then you can just rebase that other branch using something like In the future, we'd like for this to be done automatically with a new |
Beta Was this translation helpful? Give feedback.
If you delete the branch in GitHub using the "delete branch" button on the PR page after merging the PR, then
jj git fetchwill automatically abandon the old version of the changes that were rebased, assuming you don't have any other branches on top of them. This will avoid the divergent changes.Otherwise, if you do have another branch on top of the rebased branch, then you can just rebase that other branch using something like
jj rebase -b <other branch> -d main, andjjwill automatically abandon any duplicate commits, resolving the divergence.In the future, we'd like for this to be done automatically with a new
jj synccommand I believe, but it hasn't been implemented yet.