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:
|
Replies: 3 comments 9 replies
|
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 |
|
nice, could this be put into a faq somewhere? i'm trying jj out, and use the rebase-and-merge workflow extensively in github, and could not find this problem referred to in any of the docs. |
|
I would like to say that having to abandon after each PR is a bit of a bummer because I like to rebase (at least for now) on merge |
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.