mirror of
https://github.com/martinvonz/jj.git
synced 2024-11-24 06:19:42 +00:00
5dab5e1ce6
The replacement is not purely mechanical, some text is also adjusted to talk about bookmarks.
122 lines
16 KiB
XML
122 lines
16 KiB
XML
<!-- Created with term-transcript v0.3.0 (https://github.com/slowli/term-transcript) -->
|
||
<svg viewBox="0 0 720 1496" width="720" height="1496" xmlns="http://www.w3.org/2000/svg">
|
||
<style>
|
||
.container {
|
||
font: 14px Fira Code, Liberation Mono, SFMono-Regular, Consolas, Menlo, monospace;
|
||
line-height: 18px;
|
||
}
|
||
.input,.output,.output-bg {
|
||
white-space: pre;
|
||
}
|
||
.input-bg { fill: #fff; fill-opacity: 0.1; }
|
||
.output-bg { user-select: none; text-rendering: geometricPrecision; stroke-width: 0.1; }
|
||
.bold,.prompt { font-weight: 600; }
|
||
.italic { font-style: italic; }
|
||
.underline { text-decoration: underline; }
|
||
.dimmed { fill-opacity: 0.7; }
|
||
.hard-br { font-size: 16px; fill-opacity: 0.8; user-select: none; }
|
||
.fg0 { fill: #0c0c0c; } .output-bg .fg0 { stroke: #0c0c0c; }
|
||
.fg1 { fill: #c50f1f; } .output-bg .fg1 { stroke: #c50f1f; }
|
||
.fg2 { fill: #13a10e; } .output-bg .fg2 { stroke: #13a10e; }
|
||
.fg3 { fill: #c19c00; } .output-bg .fg3 { stroke: #c19c00; }
|
||
.fg4 { fill: #0037da; } .output-bg .fg4 { stroke: #0037da; }
|
||
.fg5 { fill: #881798; } .output-bg .fg5 { stroke: #881798; }
|
||
.fg6 { fill: #3a96dd; } .output-bg .fg6 { stroke: #3a96dd; }
|
||
.fg7 { fill: #cccccc; } .output-bg .fg7 { stroke: #cccccc; }
|
||
.fg8 { fill: #767676; } .output-bg .fg8 { stroke: #767676; }
|
||
.fg9 { fill: #e74856; } .output-bg .fg9 { stroke: #e74856; }
|
||
.fg10 { fill: #16c60c; } .output-bg .fg10 { stroke: #16c60c; }
|
||
.fg11 { fill: #f9f1a5; } .output-bg .fg11 { stroke: #f9f1a5; }
|
||
.fg12 { fill: #3b78ff; } .output-bg .fg12 { stroke: #3b78ff; }
|
||
.fg13 { fill: #b4009e; } .output-bg .fg13 { stroke: #b4009e; }
|
||
.fg14 { fill: #61d6d6; } .output-bg .fg14 { stroke: #61d6d6; }
|
||
.fg15 { fill: #f2f2f2; } .output-bg .fg15 { stroke: #f2f2f2; }
|
||
</style>
|
||
<rect width="100%" height="100%" y="0" rx="4.5" style="fill: #0c0c0c;" />
|
||
<svg x="0" y="10" width="720" height="1476" viewBox="0 0 720 1476">
|
||
<g class="input-bg"></g>
|
||
<text class="container fg7"><tspan xml:space="preserve" x="10" y="14" class="output">
|
||
</tspan><tspan xml:space="preserve" x="10" y="32" class="output"><tspan class="fg2"># We are in a repo with three commits, all</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="50" class="output"><tspan class="fg2"># editing the same line:</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="68" class="output">
|
||
</tspan><tspan xml:space="preserve" x="10" y="86" class="output">$ jj log
|
||
</tspan><tspan xml:space="preserve" x="10" y="104" class="output"><tspan class="bold fg2">@</tspan> <tspan class="bold fg13">x</tspan><tspan class="bold fg8">tlupomq</tspan><tspan class="bold"> </tspan><tspan class="bold fg3">jjfan@example.com</tspan><tspan class="bold"> </tspan><tspan class="bold fg14">2024-10-13 19:54:53</tspan><tspan class="bold"> </tspan><tspan class="bold fg12">f</tspan><tspan class="bold fg8">d822031</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="122" class="output">│ <tspan class="bold fg10">(empty)</tspan><tspan class="bold"> </tspan><tspan class="bold fg10">(no description set)</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="140" class="output">○ <tspan class="bold fg5">vl</tspan><tspan class="fg8">rryzpm</tspan> <tspan class="fg3">jjfan@example.com</tspan> <tspan class="fg6">2024-10-13 19:54:53</tspan> <tspan class="fg5">third</tspan> <tspan class="bold fg4">e</tspan><tspan class="fg8">5609328</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="158" class="output">│ third
|
||
</tspan><tspan xml:space="preserve" x="10" y="176" class="output">○ <tspan class="bold fg5">vo</tspan><tspan class="fg8">zropow</tspan> <tspan class="fg3">jjfan@example.com</tspan> <tspan class="fg6">2024-10-13 19:54:53</tspan> <tspan class="fg5">second</tspan> <tspan class="bold fg4">8</tspan><tspan class="fg8">38a97d1</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="194" class="output">│ second
|
||
</tspan><tspan xml:space="preserve" x="10" y="212" class="output">○ <tspan class="bold fg5">y</tspan><tspan class="fg8">zkyuwyx</tspan> <tspan class="fg3">jjfan@example.com</tspan> <tspan class="fg6">2024-10-13 19:54:53</tspan> <tspan class="fg5">first</tspan> <tspan class="bold fg4">d</tspan><tspan class="fg8">11b168f</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="230" class="output">│ first
|
||
</tspan><tspan xml:space="preserve" x="10" y="248" class="output"><tspan class="bold fg14">◆</tspan> <tspan class="bold fg5">z</tspan><tspan class="fg8">zzzzzzz</tspan> <tspan class="fg2">root()</tspan> <tspan class="bold fg4">0</tspan><tspan class="fg8">0000000</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="266" class="output">$ jj diff -r first
|
||
</tspan><tspan xml:space="preserve" x="10" y="284" class="output"><tspan class="fg3">Added regular file file:</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="302" class="output"> <tspan class="fg2"> 1</tspan>: <tspan class="underline fg2">first</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="320" class="output">$ jj diff -r second
|
||
</tspan><tspan xml:space="preserve" x="10" y="338" class="output"><tspan class="fg3">Modified regular file file:</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="356" class="output"><tspan class="fg1"> 1</tspan> <tspan class="fg2"> 1</tspan>: <tspan class="underline fg1">first</tspan><tspan class="underline fg2">second</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="374" class="output">$ jj diff -r third
|
||
</tspan><tspan xml:space="preserve" x="10" y="392" class="output"><tspan class="fg3">Modified regular file file:</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="410" class="output"><tspan class="fg1"> 1</tspan> <tspan class="fg2"> 1</tspan>: <tspan class="underline fg1">second</tspan><tspan class="underline fg2">third</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="428" class="output">
|
||
</tspan><tspan xml:space="preserve" x="10" y="446" class="output"><tspan class="fg2"># Let's reorder the second and third commits:</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="464" class="output">
|
||
</tspan><tspan xml:space="preserve" x="10" y="482" class="output">$ jj rebase -s third -d first
|
||
</tspan><tspan xml:space="preserve" x="10" y="500" class="output"><tspan class="fg8">... (output redacted) ...</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="518" class="output">$ jj rebase -s second -d third
|
||
</tspan><tspan xml:space="preserve" x="10" y="536" class="output">Rebased 1 commits
|
||
</tspan><tspan xml:space="preserve" x="10" y="554" class="output">$ jj log
|
||
</tspan><tspan xml:space="preserve" x="10" y="572" class="output">○ <tspan class="bold fg5">vo</tspan><tspan class="fg8">zropow</tspan> <tspan class="fg3">jjfan@example.com</tspan> <tspan class="fg6">2024-10-13 19:54:54</tspan> <tspan class="fg5">second</tspan> <tspan class="bold fg4">b</tspan><tspan class="fg8">ab527f4</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="590" class="output">│ second
|
||
</tspan><tspan xml:space="preserve" x="10" y="608" class="output">│ <tspan class="bold fg9">@</tspan> <tspan class="bold fg13">x</tspan><tspan class="bold fg8">tlupomq</tspan><tspan class="bold"> </tspan><tspan class="bold fg3">jjfan@example.com</tspan><tspan class="bold"> </tspan><tspan class="bold fg14">2024-10-13 19:54:54</tspan><tspan class="bold"> </tspan><tspan class="bold fg12">c</tspan><tspan class="bold fg8">ccec5aa</tspan><tspan class="bold"> </tspan><tspan class="bold fg9">conflict</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="626" class="output">├─╯ <tspan class="bold fg10">(empty)</tspan><tspan class="bold"> </tspan><tspan class="bold fg10">(no description set)</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="644" class="output"><tspan class="bold fg1">×</tspan> <tspan class="bold fg5">vl</tspan><tspan class="fg8">rryzpm</tspan> <tspan class="fg3">jjfan@example.com</tspan> <tspan class="fg6">2024-10-13 19:54:54</tspan> <tspan class="fg5">third</tspan> <tspan class="bold fg4">2</tspan><tspan class="fg8">52149ab</tspan> <tspan class="fg1">conflict</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="662" class="output">│ third
|
||
</tspan><tspan xml:space="preserve" x="10" y="680" class="output">○ <tspan class="bold fg5">y</tspan><tspan class="fg8">zkyuwyx</tspan> <tspan class="fg3">jjfan@example.com</tspan> <tspan class="fg6">2024-10-13 19:54:53</tspan> <tspan class="fg5">first</tspan> <tspan class="bold fg4">d</tspan><tspan class="fg8">11b168f</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="698" class="output">│ first
|
||
</tspan><tspan xml:space="preserve" x="10" y="716" class="output"><tspan class="bold fg14">◆</tspan> <tspan class="bold fg5">z</tspan><tspan class="fg8">zzzzzzz</tspan> <tspan class="fg2">root()</tspan> <tspan class="bold fg4">0</tspan><tspan class="fg8">0000000</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="734" class="output">
|
||
</tspan><tspan xml:space="preserve" x="10" y="752" class="output"><tspan class="fg2"># The commit labeled "third" has a conflict, as expected. What's more</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="770" class="output"><tspan class="fg2"># interesting is that the top commit has no conflict! That's because it</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="788" class="output"><tspan class="fg2"># has the changes from all three commits applied to it.</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="806" class="output"><tspan class="fg2"># </tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="824" class="output"><tspan class="fg2"># Let's verify that by looking at its contents:</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="842" class="output">
|
||
</tspan><tspan xml:space="preserve" x="10" y="860" class="output">$ jj new second
|
||
</tspan><tspan xml:space="preserve" x="10" y="878" class="output">Working copy now at: <tspan class="bold fg13">l</tspan><tspan class="bold fg8">wwotoor</tspan><tspan class="bold"> </tspan><tspan class="bold fg12">7</tspan><tspan class="bold fg8">d2b3194</tspan><tspan class="bold"> </tspan><tspan class="bold fg10">(empty)</tspan><tspan class="bold"> </tspan><tspan class="bold fg10">(no description set)</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="896" class="output">Parent commit : <tspan class="bold fg5">vo</tspan><tspan class="fg8">zropow</tspan> <tspan class="bold fg4">b</tspan><tspan class="fg8">ab527f4</tspan> <tspan class="fg5">second</tspan><tspan class="fg8"> | </tspan>second
|
||
</tspan><tspan xml:space="preserve" x="10" y="914" class="output">Added 0 files, modified 1 files, removed 0 files
|
||
</tspan><tspan xml:space="preserve" x="10" y="932" class="output">$ cat file
|
||
</tspan><tspan xml:space="preserve" x="10" y="950" class="output">third
|
||
</tspan><tspan xml:space="preserve" x="10" y="968" class="output">
|
||
</tspan><tspan xml:space="preserve" x="10" y="986" class="output"><tspan class="fg2"># Let's now instead make "second" and "third"</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="1004" class="output"><tspan class="fg2"># sibling and merge them:</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="1022" class="output">
|
||
</tspan><tspan xml:space="preserve" x="10" y="1040" class="output">$ jj rebase -s second -d first
|
||
</tspan><tspan xml:space="preserve" x="10" y="1058" class="output">Rebased 2 commits
|
||
</tspan><tspan xml:space="preserve" x="10" y="1076" class="output">Working copy now at: <tspan class="bold fg13">l</tspan><tspan class="bold fg8">wwotoor</tspan><tspan class="bold"> </tspan><tspan class="bold fg12">f</tspan><tspan class="bold fg8">6445745</tspan><tspan class="bold"> </tspan><tspan class="bold fg10">(empty)</tspan><tspan class="bold"> </tspan><tspan class="bold fg10">(no description set)</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="1094" class="output">Parent commit : <tspan class="bold fg5">vo</tspan><tspan class="fg8">zropow</tspan> <tspan class="bold fg4">5</tspan><tspan class="fg8">ccf5c89</tspan> <tspan class="fg5">second</tspan><tspan class="fg8"> | </tspan>second
|
||
</tspan><tspan xml:space="preserve" x="10" y="1112" class="output">Added 0 files, modified 1 files, removed 0 files
|
||
</tspan><tspan xml:space="preserve" x="10" y="1130" class="output">$ jj new second third -m merged
|
||
</tspan><tspan xml:space="preserve" x="10" y="1148" class="output">Working copy now at: <tspan class="bold fg13">k</tspan><tspan class="bold fg8">tkzxtmq</tspan><tspan class="bold"> </tspan><tspan class="bold fg12">2d</tspan><tspan class="bold fg8">d72c52</tspan><tspan class="bold"> </tspan><tspan class="bold fg10">(empty)</tspan><tspan class="bold"> merged</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="1166" class="output">Parent commit : <tspan class="bold fg5">vo</tspan><tspan class="fg8">zropow</tspan> <tspan class="bold fg4">5</tspan><tspan class="fg8">ccf5c89</tspan> <tspan class="fg5">second</tspan><tspan class="fg8"> | </tspan>second
|
||
</tspan><tspan xml:space="preserve" x="10" y="1184" class="output">Parent commit : <tspan class="bold fg5">vl</tspan><tspan class="fg8">rryzpm</tspan> <tspan class="bold fg4">25</tspan><tspan class="fg8">2149ab</tspan> <tspan class="fg5">third</tspan><tspan class="fg8"> | </tspan><tspan class="fg1">(conflict)</tspan> third
|
||
</tspan><tspan xml:space="preserve" x="10" y="1202" class="output">Added 0 files, modified 1 files, removed 0 files
|
||
</tspan><tspan xml:space="preserve" x="10" y="1220" class="output">$ jj log
|
||
</tspan><tspan xml:space="preserve" x="10" y="1238" class="output"><tspan class="bold fg2">@</tspan> <tspan class="bold fg13">k</tspan><tspan class="bold fg8">tkzxtmq</tspan><tspan class="bold"> </tspan><tspan class="bold fg3">jjfan@example.com</tspan><tspan class="bold"> </tspan><tspan class="bold fg14">2024-10-13 19:54:54</tspan><tspan class="bold"> </tspan><tspan class="bold fg12">2d</tspan><tspan class="bold fg8">d72c52</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="1256" class="output">├─╮ <tspan class="bold fg10">(empty)</tspan><tspan class="bold"> merged</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="1274" class="output">│ <tspan class="bold fg1">×</tspan> <tspan class="bold fg5">vl</tspan><tspan class="fg8">rryzpm</tspan> <tspan class="fg3">jjfan@example.com</tspan> <tspan class="fg6">2024-10-13 19:54:54</tspan> <tspan class="fg5">third</tspan> <tspan class="bold fg4">25</tspan><tspan class="fg8">2149ab</tspan> <tspan class="fg1">conflict</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="1292" class="output">│ │ third
|
||
</tspan><tspan xml:space="preserve" x="10" y="1310" class="output">○ │ <tspan class="bold fg5">vo</tspan><tspan class="fg8">zropow</tspan> <tspan class="fg3">jjfan@example.com</tspan> <tspan class="fg6">2024-10-13 19:54:54</tspan> <tspan class="fg5">second</tspan> <tspan class="bold fg4">5</tspan><tspan class="fg8">ccf5c89</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="1328" class="output">├─╯ second
|
||
</tspan><tspan xml:space="preserve" x="10" y="1346" class="output">○ <tspan class="bold fg5">y</tspan><tspan class="fg8">zkyuwyx</tspan> <tspan class="fg3">jjfan@example.com</tspan> <tspan class="fg6">2024-10-13 19:54:53</tspan> <tspan class="fg5">first</tspan> <tspan class="bold fg4">d</tspan><tspan class="fg8">11b168f</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="1364" class="output">│ first
|
||
</tspan><tspan xml:space="preserve" x="10" y="1382" class="output"><tspan class="bold fg14">◆</tspan> <tspan class="bold fg5">z</tspan><tspan class="fg8">zzzzzzz</tspan> <tspan class="fg2">root()</tspan> <tspan class="bold fg4">0</tspan><tspan class="fg8">0000000</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="1400" class="output">
|
||
</tspan><tspan xml:space="preserve" x="10" y="1418" class="output"><tspan class="fg2"># Again, because the merge commit has the</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="1436" class="output"><tspan class="fg2"># changes from all three commits, it has no</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="1454" class="output"><tspan class="fg2"># conflict.</tspan>
|
||
</tspan><tspan xml:space="preserve" x="10" y="1472" class="output">
|
||
</tspan></text>
|
||
</svg>
|
||
</svg>
|