cheat sheet: mark transplanted commits with prime#2076
Merged
To1ne merged 1 commit intogit:gh-pagesfrom Sep 17, 2025
Merged
Conversation
similar to how manpages git-rebase(1) and git-cherry-pick(1) indicate them
Collaborator
To1ne
approved these changes
Sep 17, 2025
Collaborator
To1ne
left a comment
There was a problem hiding this comment.
Yes! I'm digging these changes. I didn't realize we needed them, but we do.
Collaborator
I had to look this up, but it's the correct thing to do: https://en.wikipedia.org/wiki/Prime_(symbol)#Use_in_mathematics,_statistics,_and_science
I prefer escaped, like you did. |
To1ne
added a commit
that referenced
this pull request
Oct 1, 2025
Made a couple of tweaks to #2076 that I think will make things clearer: 1. Make the D' boxes a bit wider, so it doesn't look so cramped 2. Remove the "prime" from the stacked D and E The idea of the "prime" annotation is that D is somehow a shorthand for a commit ID, and D' is meant to suggest that the transplanted commit has a different commit ID. I think this makes sense. But with the stacked D and E, the two D and E being grouped together are already doing the work to show that the new commit is modified in some way, so we don't need to add the "prime" (and it's not clear to me what the prime could actually mean).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Mark transplanted commits with prime, similar to how manpages git-rebase(1) and git-cherry-pick(1) indicate them.
Changes
′U+2032) to letters representing commits transplanted bygit rebasegit merge --squashgit cherry-pickContext
Like in the manpages git-rebase(1) and git-cherry-pick(1), 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 characterPRIMEinstead. 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.