diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-07-28 13:17:59 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-28 13:17:59 -0700 |
commit | 6ca224f1560ec43973e0f1c76bc8ef487a6e107b (patch) | |
tree | 07039dff6971f561c32d0eb1ca77d1d90f7aaa2b /Documentation | |
parent | Merge branch 'ab/attribute-format' (diff) | |
parent | git-diff: fix missing --merge-base docs (diff) | |
download | tgif-6ca224f1560ec43973e0f1c76bc8ef487a6e107b.tar.xz |
Merge branch 'dl/diff-merge-base'
"git diff --merge-base" documentation has been updated.
* dl/diff-merge-base:
git-diff: fix missing --merge-base docs
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-diff.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 7f4c8a8ce7..6236c75c9b 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -51,16 +51,20 @@ files on disk. --staged is a synonym of --cached. + If --merge-base is given, instead of using <commit>, use the merge base -of <commit> and HEAD. `git diff --merge-base A` is equivalent to -`git diff $(git merge-base A HEAD)`. +of <commit> and HEAD. `git diff --cached --merge-base A` is equivalent to +`git diff --cached $(git merge-base A HEAD)`. -'git diff' [<options>] <commit> [--] [<path>...]:: +'git diff' [<options>] [--merge-base] <commit> [--] [<path>...]:: This form is to view the changes you have in your working tree relative to the named <commit>. You can use HEAD to compare it with the latest commit, or a branch name to compare with the tip of a different branch. ++ +If --merge-base is given, instead of using <commit>, use the merge base +of <commit> and HEAD. `git diff --merge-base A` is equivalent to +`git diff $(git merge-base A HEAD)`. 'git diff' [<options>] [--merge-base] <commit> <commit> [--] [<path>...]:: |