Avoid using the three-dot and two-dot terminology in realtion to git diff #32224
Labels
content
This issue or pull request belongs to the Docs Content team
pull requests
Content related to pull requests
stale
There is no recent activity on this issue or pull request
waiting for review
Issue/PR is waiting for a writer's review
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-comparing-branches-in-pull-requests#three-dot-and-two-dot-git-diff-comparisons
What part(s) of the article would you like to see updated?
The use of A...B and A..B when using
git diff
is not recommended by the developers of git, since this terminology refers to ranges, andgit diff
doesn't work with ranges, but works with endpoints.What makes this use even more confusing is that
git diff A..B
compares A and B, whereasgit log A..B
compares merge base of A and B, with B, and vice versa,git diff A...B
compares merge base of A and B, with B, whereasgit log A...B
compares A and B.This answer on stackoverflow explains this issue better than me, and quotes the developers of git.
I suggest replacing the use of "three-dot git diff" with
git diff --merge-base base-branch topic-branch
, and "two-dot git diff"git diff base-branch topic-branch
.Additional information
No response
The text was updated successfully, but these errors were encountered: