This is a lesson by way of a sandbox repository. We have a file at commit A that looks like:
# double-triple-dot-git
This line will be used for commit B: I am adding some text for commit B
This line will be used for commit C: I am adding some text for commit C
This line will be used for commit D: I am adding some text for commit DWe will have 6 additional commits. Across the following branches:
A - B main
\
C - D test
A - B' main_minus
\
C' - D' test_minus
A commit with just a letter adds to the related line whereas a commit with a prime (') will remove the text on the related line. See the commits here (these show you the difference to the parent, so do look at the diagram above):
Here is our full repo history:
* d3a0377 D' (origin/test_minus)
|
* 5dd0906 C'
|
| * c41c8ef D (origin/test)
| |
| * 232caf4 C
|/
| * dd9c11e B' (origin/main_minus)
|/
| * 29adf51 B (origin/main)
|/
* fd3c4fb A
|
* bf39729 Initial commit - Christopher BullSuggested links:
Note that PRs are based on 3 dot diffs. Note that in the 4th example above there's a possible gotcha on an actual merge! (All lines will be deleted).
Feel free to add to the explanations above and fork the repo'.