Debian Codegraph @

demos/git_compat.svg

raw
1 <!-- Created with term-transcript v0.4.0 (https://github.com/slowli/term-transcript) -->
2 <svg viewBox="0 0 720 1856" width="720" height="1856" xmlns="http://www.w3.org/2000/svg">
3 <style>
4 .container {
5 font: 14px Fira Code, Liberation Mono, SFMono-Regular, Consolas, Menlo, monospace;
6 line-height: 18px;
7 }
8 .input,.output,.output-bg {
9 white-space: pre;
10 }
11 .input-bg { fill: #fff; fill-opacity: 0.1; }
12 .output-bg { user-select: none; text-rendering: geometricPrecision; stroke-width: 0.1; }
13 .bold,.prompt { font-weight: 600; }
14 .italic { font-style: italic; }
15 .underline { text-decoration: underline; }
16 .dimmed { fill-opacity: 0.7; }
17 .hard-br { font-size: 16px; fill-opacity: 0.8; user-select: none; }
18 .fg0 { fill: #0c0c0c; } .output-bg .fg0 { stroke: #0c0c0c; }
19 .fg1 { fill: #c50f1f; } .output-bg .fg1 { stroke: #c50f1f; }
20 .fg2 { fill: #13a10e; } .output-bg .fg2 { stroke: #13a10e; }
21 .fg3 { fill: #c19c00; } .output-bg .fg3 { stroke: #c19c00; }
22 .fg4 { fill: #0037da; } .output-bg .fg4 { stroke: #0037da; }
23 .fg5 { fill: #881798; } .output-bg .fg5 { stroke: #881798; }
24 .fg6 { fill: #3a96dd; } .output-bg .fg6 { stroke: #3a96dd; }
25 .fg7 { fill: #cccccc; } .output-bg .fg7 { stroke: #cccccc; }
26 .fg8 { fill: #767676; } .output-bg .fg8 { stroke: #767676; }
27 .fg9 { fill: #e74856; } .output-bg .fg9 { stroke: #e74856; }
28 .fg10 { fill: #16c60c; } .output-bg .fg10 { stroke: #16c60c; }
29 .fg11 { fill: #f9f1a5; } .output-bg .fg11 { stroke: #f9f1a5; }
30 .fg12 { fill: #3b78ff; } .output-bg .fg12 { stroke: #3b78ff; }
31 .fg13 { fill: #b4009e; } .output-bg .fg13 { stroke: #b4009e; }
32 .fg14 { fill: #61d6d6; } .output-bg .fg14 { stroke: #61d6d6; }
33 .fg15 { fill: #f2f2f2; } .output-bg .fg15 { stroke: #f2f2f2; }
34 </style>
35 <rect width="100%" height="100%" y="0" rx="4.5" style="fill: #0c0c0c;" />
36 <svg x="0" y="10" width="720" height="1836" viewBox="0 0 720 1836">
37 <g class="input-bg"></g>
38 <text class="container fg7"><tspan xml:space="preserve" x="10" y="14" class="output">
39 </tspan><tspan xml:space="preserve" x="10" y="32" class="output"><tspan class="fg2"># Clone a Git repo:</tspan>
40 </tspan><tspan xml:space="preserve" x="10" y="50" class="output">
41 </tspan><tspan xml:space="preserve" x="10" y="68" class="output">$ jj git clone https://github.com/octocat/Hello-World
42 </tspan><tspan xml:space="preserve" x="10" y="86" class="output">Fetching into new repo in "/tmp/tmp.MSKYMYpbzf/Hello-World"
43 </tspan><tspan xml:space="preserve" x="10" y="104" class="output">bookmark: <tspan class="fg5">master@origin         </tspan> [new] tracked
44 </tspan><tspan xml:space="preserve" x="10" y="122" class="output">bookmark: <tspan class="fg5">octocat-patch-1@origin</tspan> [new] untracked
45 </tspan><tspan xml:space="preserve" x="10" y="140" class="output">bookmark: <tspan class="fg5">test@origin           </tspan> [new] untracked
46 </tspan><tspan xml:space="preserve" x="10" y="158" class="output">Setting the revset alias `trunk()` to `master@origin`
47 </tspan><tspan xml:space="preserve" x="10" y="176" class="output">Working copy  (@) now at: <tspan class="bold fg13">r</tspan><tspan class="bold fg8">yovlopo</tspan><tspan class="bold"> </tspan><tspan class="bold fg12">6</tspan><tspan class="bold fg8">ae4c1dd</tspan><tspan class="bold"> </tspan><tspan class="bold fg10">(empty)</tspan><tspan class="bold"> </tspan><tspan class="bold fg10">(no description set)</tspan>
48 </tspan><tspan xml:space="preserve" x="10" y="194" class="output">Parent commit (@-)      : <tspan class="bold fg5">o</tspan><tspan class="fg8">rrkosyo</tspan> <tspan class="bold fg4">7</tspan><tspan class="fg8">fd1a60b</tspan> <tspan class="fg5">master</tspan><tspan class="fg8"> | </tspan><tspan class="fg2">(empty)</tspan> Merge pull request <tspan class="hard-br" rotate="45" dx=".1em" dy="-.2em">↓</tspan>
49 </tspan><tspan xml:space="preserve" x="10" y="212" class="output">#6 from Spaceghost/patch-1
50 </tspan><tspan xml:space="preserve" x="10" y="230" class="output">Added 1 files, modified 0 files, removed 0 files
51 </tspan><tspan xml:space="preserve" x="10" y="248" class="output"><tspan class="bold fg6">Hint: </tspan>Running `git clean -xdf` will remove `.jj/`!
52 </tspan><tspan xml:space="preserve" x="10" y="266" class="output">$ cd Hello-World
53 </tspan><tspan xml:space="preserve" x="10" y="284" class="output">
54 </tspan><tspan xml:space="preserve" x="10" y="302" class="output">
55 </tspan><tspan xml:space="preserve" x="10" y="320" class="output"><tspan class="fg2"># By default, "jj" creates a local bookmark "master" tracking the remote master</tspan>
56 </tspan><tspan xml:space="preserve" x="10" y="338" class="output"><tspan class="fg2"># branch. Other remote branches are only available as remote-tracking bookmarks.</tspan>
57 </tspan><tspan xml:space="preserve" x="10" y="356" class="output">
58 </tspan><tspan xml:space="preserve" x="10" y="374" class="output">$ jj bookmark list --all
59 </tspan><tspan xml:space="preserve" x="10" y="392" class="output"><tspan class="fg5">master</tspan>: <tspan class="bold fg5">o</tspan><tspan class="fg8">rrkosyo</tspan> <tspan class="bold fg4">7</tspan><tspan class="fg8">fd1a60b</tspan> <tspan class="fg2">(empty)</tspan> Merge pull request #6 from Spaceghost/patch-1
60 </tspan><tspan xml:space="preserve" x="10" y="410" class="output">  <tspan class="fg5">@git</tspan>: <tspan class="bold fg5">o</tspan><tspan class="fg8">rrkosyo</tspan> <tspan class="bold fg4">7</tspan><tspan class="fg8">fd1a60b</tspan> <tspan class="fg2">(empty)</tspan> Merge pull request #6 from Spaceghost/patch-1
61 </tspan><tspan xml:space="preserve" x="10" y="428" class="output">  <tspan class="fg5">@origin</tspan>: <tspan class="bold fg5">o</tspan><tspan class="fg8">rrkosyo</tspan> <tspan class="bold fg4">7</tspan><tspan class="fg8">fd1a60b</tspan> <tspan class="fg2">(empty)</tspan> Merge pull request #6 from Spaceghost/patch<tspan class="hard-br" rotate="45" dx=".1em" dy="-.2em">↓</tspan>
62 </tspan><tspan xml:space="preserve" x="10" y="446" class="output">-1
63 </tspan><tspan xml:space="preserve" x="10" y="464" class="output"><tspan class="fg5">octocat-patch-1@origin</tspan>: <tspan class="bold fg5">t</tspan><tspan class="fg8">pstlust</tspan> <tspan class="bold fg4">b1</tspan><tspan class="fg8">b3f972</tspan> sentence case
64 </tspan><tspan xml:space="preserve" x="10" y="482" class="output"><tspan class="fg5">test@origin</tspan>: <tspan class="bold fg5">k</tspan><tspan class="fg8">owxouwz</tspan> <tspan class="bold fg4">b3</tspan><tspan class="fg8">cbd5bb</tspan> Create CONTRIBUTING.md
65 </tspan><tspan xml:space="preserve" x="10" y="500" class="output">
66 </tspan><tspan xml:space="preserve" x="10" y="518" class="output"><tspan class="fg2"># We can create a local bookmark tracking one of the remote branches we just</tspan>
67 </tspan><tspan xml:space="preserve" x="10" y="536" class="output"><tspan class="fg2"># fetched.</tspan>
68 </tspan><tspan xml:space="preserve" x="10" y="554" class="output">
69 </tspan><tspan xml:space="preserve" x="10" y="572" class="output">$ jj bookmark track octocat-patch-1 --remote=origin
70 </tspan><tspan xml:space="preserve" x="10" y="590" class="output">Started tracking 1 remote bookmarks.
71 </tspan><tspan xml:space="preserve" x="10" y="608" class="output">
72 </tspan><tspan xml:space="preserve" x="10" y="626" class="output"><tspan class="fg2"># By default, "jj log" excludes untracked remote branches to focus on</tspan>
73 </tspan><tspan xml:space="preserve" x="10" y="644" class="output"><tspan class="fg2"># "our" commits.</tspan>
74 </tspan><tspan xml:space="preserve" x="10" y="662" class="output">
75 </tspan><tspan xml:space="preserve" x="10" y="680" class="output">$ jj log
76 </tspan><tspan xml:space="preserve" x="10" y="698" class="output"><tspan class="bold fg2">@</tspan>  <tspan class="bold fg13">r</tspan><tspan class="bold fg8">yovlopo</tspan><tspan class="bold"> </tspan><tspan class="bold fg3">[email protected]</tspan><tspan class="bold"> </tspan><tspan class="bold fg14">2025-12-20 10:52:40</tspan><tspan class="bold"> </tspan><tspan class="bold fg12">6</tspan><tspan class="bold fg8">ae4c1dd</tspan>
77 </tspan><tspan xml:space="preserve" x="10" y="716" class="output">│  <tspan class="bold fg10">(empty)</tspan><tspan class="bold"> </tspan><tspan class="bold fg10">(no description set)</tspan>
78 </tspan><tspan xml:space="preserve" x="10" y="734" class="output">│ ○  <tspan class="bold fg5">t</tspan><tspan class="fg8">pstlust</tspan> <tspan class="fg3">[email protected]</tspan> <tspan class="fg6">2018-05-10 11:55:19</tspan> <tspan class="fg5">octocat-patch-1</tspan>
79 </tspan><tspan xml:space="preserve" x="10" y="752" class="output">├─╯  <tspan class="bold fg4">b</tspan><tspan class="fg8">1b3f972</tspan>
80 </tspan><tspan xml:space="preserve" x="10" y="770" class="output">│    sentence case
81 </tspan><tspan xml:space="preserve" x="10" y="788" class="output"><tspan class="bold fg14">◆</tspan>  <tspan class="bold fg5">o</tspan><tspan class="fg8">rrkosyo</tspan> <tspan class="fg3">[email protected]</tspan> <tspan class="fg6">2012-03-06 17:06:50</tspan> <tspan class="fg5">master</tspan> <tspan class="bold fg4">7</tspan><tspan class="fg8">fd1a60b</tspan>
82 </tspan><tspan xml:space="preserve" x="10" y="806" class="output">│  <tspan class="fg2">(empty)</tspan> Merge pull request #6 from Spaceghost/patch-1
83 </tspan><tspan xml:space="preserve" x="10" y="824" class="output">~
84 </tspan><tspan xml:space="preserve" x="10" y="842" class="output">
85 </tspan><tspan xml:space="preserve" x="10" y="860" class="output"><tspan class="fg2"># We can also ask "jj" to show all the commits.</tspan>
86 </tspan><tspan xml:space="preserve" x="10" y="878" class="output">
87 </tspan><tspan xml:space="preserve" x="10" y="896" class="output">$ jj log -r 'all()'
88 </tspan><tspan xml:space="preserve" x="10" y="914" class="output"><tspan class="bold fg2">@</tspan>  <tspan class="bold fg13">r</tspan><tspan class="bold fg8">yovlopo</tspan><tspan class="bold"> </tspan><tspan class="bold fg3">[email protected]</tspan><tspan class="bold"> </tspan><tspan class="bold fg14">2025-12-20 10:52:40</tspan><tspan class="bold"> </tspan><tspan class="bold fg12">6</tspan><tspan class="bold fg8">ae4c1dd</tspan>
89 </tspan><tspan xml:space="preserve" x="10" y="932" class="output">│  <tspan class="bold fg10">(empty)</tspan><tspan class="bold"> </tspan><tspan class="bold fg10">(no description set)</tspan>
90 </tspan><tspan xml:space="preserve" x="10" y="950" class="output">│ ○  <tspan class="bold fg5">t</tspan><tspan class="fg8">pstlust</tspan> <tspan class="fg3">[email protected]</tspan> <tspan class="fg6">2018-05-10 11:55:19</tspan> <tspan class="fg5">octocat-patch-1</tspan>
91 </tspan><tspan xml:space="preserve" x="10" y="968" class="output">├─╯  <tspan class="bold fg4">b</tspan><tspan class="fg8">1b3f972</tspan>
92 </tspan><tspan xml:space="preserve" x="10" y="986" class="output">│    sentence case
93 </tspan><tspan xml:space="preserve" x="10" y="1004" class="output">│ <tspan class="bold fg14">◆</tspan>  <tspan class="bold fg5">k</tspan><tspan class="fg8">owxouwz</tspan> <tspan class="fg3">[email protected]</tspan> <tspan class="fg6">2014-06-10 16:22:26</tspan> <tspan class="fg5">test@origin</tspan> <tspan class="bold fg4">b3</tspan><tspan class="fg8">cbd5bb</tspan>
94 </tspan><tspan xml:space="preserve" x="10" y="1022" class="output">├─╯  Create CONTRIBUTING.md
95 </tspan><tspan xml:space="preserve" x="10" y="1040" class="output"><tspan class="bold fg14">◆</tspan>    <tspan class="bold fg5">o</tspan><tspan class="fg8">rrkosyo</tspan> <tspan class="fg3">[email protected]</tspan> <tspan class="fg6">2012-03-06 17:06:50</tspan> <tspan class="fg5">master</tspan> <tspan class="bold fg4">7</tspan><tspan class="fg8">fd1a60b</tspan>
96 </tspan><tspan xml:space="preserve" x="10" y="1058" class="output">├─╮  <tspan class="fg2">(empty)</tspan> Merge pull request #6 from Spaceghost/patch-1
97 </tspan><tspan xml:space="preserve" x="10" y="1076" class="output">│ <tspan class="bold fg14">◆</tspan>  <tspan class="bold fg5">n</tspan><tspan class="fg8">znozkvv</tspan> <tspan class="fg3">[email protected]</tspan> <tspan class="fg6">2011-09-13 22:42:41</tspan> <tspan class="bold fg4">76</tspan><tspan class="fg8">294131</tspan>
98 </tspan><tspan xml:space="preserve" x="10" y="1094" class="output">├─╯  New line at end of file. --Signed off by Spaceghost
99 </tspan><tspan xml:space="preserve" x="10" y="1112" class="output"><tspan class="bold fg14">◆</tspan>  <tspan class="bold fg5">s</tspan><tspan class="fg8">yktoqts</tspan> <tspan class="fg3">[email protected]</tspan> <tspan class="fg6">2011-01-26 13:06:08</tspan> <tspan class="bold fg4">5</tspan><tspan class="fg8">53c2077</tspan>
100 </tspan><tspan xml:space="preserve" x="10" y="1130" class="output">│  first commit
101 </tspan><tspan xml:space="preserve" x="10" y="1148" 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>
102 </tspan><tspan xml:space="preserve" x="10" y="1166" class="output">
103 </tspan><tspan xml:space="preserve" x="10" y="1184" class="output"><tspan class="fg2"># We can look at the diffs of commits in the repo</tspan>
104 </tspan><tspan xml:space="preserve" x="10" y="1202" class="output">
105 </tspan><tspan xml:space="preserve" x="10" y="1220" class="output">$ jj diff -r b1
106 </tspan><tspan xml:space="preserve" x="10" y="1238" class="output"><tspan class="fg3">Modified regular file README:</tspan>
107 </tspan><tspan xml:space="preserve" x="10" y="1256" class="output"><tspan class="fg1">   1</tspan> <tspan class="fg2">   1</tspan>: Hello <tspan class="underline fg1">World</tspan><tspan class="underline fg2">world</tspan>!
108 </tspan><tspan xml:space="preserve" x="10" y="1274" class="output">
109 </tspan><tspan xml:space="preserve" x="10" y="1292" class="output">$ jj diff -r b3
110 </tspan><tspan xml:space="preserve" x="10" y="1310" class="output"><tspan class="fg3">Added regular file CONTRIBUTING.md:</tspan>
111 </tspan><tspan xml:space="preserve" x="10" y="1328" class="output">     <tspan class="fg2">   1</tspan>: <tspan class="underline fg2">## Contributing</tspan>
112 </tspan><tspan xml:space="preserve" x="10" y="1346" class="output">
113 </tspan><tspan xml:space="preserve" x="10" y="1364" class="output"><tspan class="fg2"># We can generate a 'git format-patch' compatible diff</tspan>
114 </tspan><tspan xml:space="preserve" x="10" y="1382" class="output">
115 </tspan><tspan xml:space="preserve" x="10" y="1400" class="output">$ jj show --git --template git_format_patch_email_headers
116 </tspan><tspan xml:space="preserve" x="10" y="1418" class="output">From <tspan class="fg4">6ae4c1dde51e20fe84a32351314b3a4fafce8983</tspan> Mon Sep 17 00:00:00 2001
117 </tspan><tspan xml:space="preserve" x="10" y="1436" class="output">From: <tspan class="fg3">JJ Fan &lt;[email protected]&gt;</tspan>
118 </tspan><tspan xml:space="preserve" x="10" y="1454" class="output">Date: <tspan class="fg6">Sat, 20 Dec 2025 10:52:40 -0600</tspan>
119 </tspan><tspan xml:space="preserve" x="10" y="1472" class="output">Subject: [PATCH] 
120 </tspan><tspan xml:space="preserve" x="10" y="1490" class="output">
121 </tspan><tspan xml:space="preserve" x="10" y="1508" class="output">---
122 </tspan><tspan xml:space="preserve" x="10" y="1526" class="output"> 0 files changed, 0 insertions(+), 0 deletions(-)
123 </tspan><tspan xml:space="preserve" x="10" y="1544" class="output">
124 </tspan><tspan xml:space="preserve" x="10" y="1562" class="output">
125 </tspan><tspan xml:space="preserve" x="10" y="1580" class="output"><tspan class="fg2"># The repo is backed by the actual Git repo:</tspan>
126 </tspan><tspan xml:space="preserve" x="10" y="1598" class="output">
127 </tspan><tspan xml:space="preserve" x="10" y="1616" class="output">$ git log --graph --all --decorate --oneline
128 </tspan><tspan xml:space="preserve" x="10" y="1634" class="output">* <tspan class="fg3">1328093</tspan> 
129 </tspan><tspan xml:space="preserve" x="10" y="1652" class="output">* <tspan class="fg3">6ae4c1d</tspan> 
130 </tspan><tspan xml:space="preserve" x="10" y="1670" class="output"><tspan class="fg1">|</tspan> * <tspan class="fg3">b1b3f97</tspan><tspan class="fg3"> (</tspan><tspan class="bold fg1">origin/octocat-patch-1</tspan><tspan class="fg3">, </tspan><tspan class="bold fg2">octocat-patch-1</tspan><tspan class="fg3">)</tspan> sentence case
131 </tspan><tspan xml:space="preserve" x="10" y="1688" class="output"><tspan class="fg1">|</tspan><tspan class="fg1">/</tspan>  
132 </tspan><tspan xml:space="preserve" x="10" y="1706" class="output"><tspan class="fg1">|</tspan> * <tspan class="fg3">b3cbd5b</tspan><tspan class="fg3"> (</tspan><tspan class="bold fg1">origin/test</tspan><tspan class="fg3">)</tspan> Create CONTRIBUTING.md
133 </tspan><tspan xml:space="preserve" x="10" y="1724" class="output"><tspan class="fg1">|</tspan><tspan class="fg1">/</tspan>  
134 </tspan><tspan xml:space="preserve" x="10" y="1742" class="output">*   <tspan class="fg3">7fd1a60</tspan><tspan class="fg3"> (</tspan><tspan class="bold fg6">HEAD</tspan><tspan class="fg3">, </tspan><tspan class="bold fg1">origin/master</tspan><tspan class="fg3">, </tspan><tspan class="bold fg2">master</tspan><tspan class="fg3">)</tspan> Merge pull request #6 from Spaceghost/<tspan class="hard-br" rotate="45" dx=".1em" dy="-.2em">↓</tspan>
135 </tspan><tspan xml:space="preserve" x="10" y="1760" class="output">patch-1
136 </tspan><tspan xml:space="preserve" x="10" y="1778" class="output"><tspan class="fg4">|</tspan><tspan class="fg5">\</tspan>  
137 </tspan><tspan xml:space="preserve" x="10" y="1796" class="output"><tspan class="fg4">|</tspan> * <tspan class="fg3">7629413</tspan> New line at end of file. --Signed off by Spaceghost
138 </tspan><tspan xml:space="preserve" x="10" y="1814" class="output"><tspan class="fg4">|</tspan><tspan class="fg4">/</tspan>  
139 </tspan><tspan xml:space="preserve" x="10" y="1832" class="output">* <tspan class="fg3">553c207</tspan> first commit
140 </tspan></text>
141 </svg>
142 </svg>