Skip to content

Using jj split to create a merge commit #5151

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

You must be logged in to vote

I would do this in two steps. First, split A into A' and C:

$ jj split
$ jj log
○  wxmwxkym cf27d17a
│  A
│
@  okmlklnu 56845831
│  C
│
○  urwtlokv cb7625b3
│  B

Next, create the merge commit:

# I'm using description() here to make it easier to see
# which commit is which
$ jj new -B description(A) -A description(C) -A description(B) -m M
$ jj log
○  wxmwxkym 16129332
│  A
│
@    owxwrlll f530545a
├─╮  (empty) M
│ │
○ │  okmlklnu 56845831
├─╯  C
│
○  urwtlokv cb7625b3
│  B

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@FliegendeWurst
Comment options

Answer selected by FliegendeWurst
Comment options

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

@martinvonz
Comment options

@FliegendeWurst
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