Skip to content

Commit 96f89d8

Browse files
authored
cheat sheet: mark transplanted commits with prime (#2076)
Mark transplanted commits with prime, similar to how manpages [git-rebase(1)](https://git-scm.com/docs/git-rebase) and [git-cherry-pick(1)](https://git-scm.com/docs/git-cherry-pick) indicate them. ## Changes <!-- List the changes this PR makes. --> - add a prime symbol (`′` `U+2032`) to letters representing commits transplanted by - `git rebase` - `git merge --squash` - `git cherry-pick` ## Context <!-- Explain why you're making these changes. --> Like in the manpages [git-rebase(1)](https://git-scm.com/docs/git-rebase) and [git-cherry-pick(1)](https://git-scm.com/docs/git-cherry-pick), we should (also in the new cheat sheet) distinguish between a commit and the commit resulting from transplanting it. They will usually represent the same change, but they aren't the same commit and might (due to different ancestors) not have the same file contents in the trees they refer to (and also some metadata like commit date will differ in general), thus they aren't the _same_ commit. The manpages use the straight apostrophe (`'` a.k.a. "single quote") for this, presumably to stay with ASCII-only for compatibility. I guess the cheat sheet may dare to use the semantically more precise Unicode character `PRIME` instead. For source encoding safety, I've used the corresponding HTML entity. If I should use the un-escaped Unicode character instead or even just the ASCII straight apostrophe/single quote, please let me know.
2 parents 8b2a608 + 386cfae commit 96f89d8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/cheat-sheet/_index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ <h3>Combine with rebase:</h3>
344344
D [label="D", style="dashed", color="#f14e32", pos="2,0!"];
345345
E [label="E", style="dashed", color="#f14e32", pos="3,0!"];
346346

347-
D2 [label="D", color="#f14e32", pos="3,1!"];
348-
E2 [label="E", color="#f14e32", pos="4,1!"];
347+
D2 [label="D&#x2032;", color="#f14e32", pos="3,1!"];
348+
E2 [label="E&#x2032;", color="#f14e32", pos="4,1!"];
349349

350350

351351
main_label [label="main", shape=plaintext, pos="2,2!", fixedsize=false];
@@ -510,7 +510,7 @@ <h3>Combine with squash merge:</h3>
510510
C [label="C", pos="2,1!"];
511511
D [label="D", color="#f14e32", pos="2,0!"];
512512
E [label="E", color="#f14e32", pos="3,0!"];
513-
S [label="D\nE", color="#f14e32", pos="3,1!", width=0.6, height=0.8];
513+
S [label="D&#x2032;\nE&#x2032;", color="#f14e32", pos="3,1!", width=0.6, height=0.8];
514514

515515
main_label [label="main", shape=plaintext, pos="5,1!", fixedsize=false];
516516
main_label -> S [dir=forward];
@@ -655,7 +655,7 @@ <h3>Copy one commit onto the current branch:</h3>
655655
A [label="A", pos="0,1!"];
656656
B [label="B", pos="1,1!"];
657657
C [label="C", pos="2,1!"];
658-
D2 [label="D", color="#f14e32", pos="3,1!"];
658+
D2 [label="D&#x2032;", color="#f14e32", pos="3,1!"];
659659

660660
D [label="D", color="#f14e32", pos="2,0!"];
661661
E [label="E", pos="3,0!"];

0 commit comments

Comments
 (0)