File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -51,16 +51,20 @@ files on disk.
51
51
--staged is a synonym of --cached.
52
52
+
53
53
If --merge-base is given, instead of using <commit>, use the merge base
54
- of <commit> and HEAD. `git diff --merge-base A` is equivalent to
55
- `git diff $(git merge-base A HEAD)`.
54
+ of <commit> and HEAD. `git diff --cached -- merge-base A` is equivalent to
55
+ `git diff --cached $(git merge-base A HEAD)`.
56
56
57
- 'git diff' [<options>] <commit> [--] [<path>...]::
57
+ 'git diff' [<options>] [--merge-base] <commit> [--] [<path>...]::
58
58
59
59
This form is to view the changes you have in your
60
60
working tree relative to the named <commit>. You can
61
61
use HEAD to compare it with the latest commit, or a
62
62
branch name to compare with the tip of a different
63
63
branch.
64
+ +
65
+ If --merge-base is given, instead of using <commit>, use the merge base
66
+ of <commit> and HEAD. `git diff --merge-base A` is equivalent to
67
+ `git diff $(git merge-base A HEAD)`.
64
68
65
69
'git diff' [<options>] [--merge-base] <commit> <commit> [--] [<path>...]::
66
70
Original file line number Diff line number Diff line change 26
26
27
27
static const char builtin_diff_usage [] =
28
28
"git diff [<options>] [<commit>] [--] [<path>...]\n"
29
- " or: git diff [<options>] --cached [<commit>] [--] [<path>...]\n"
30
- " or: git diff [<options>] <commit> [--merge-base] [<commit>...] <commit> [--] [<path>...]\n"
29
+ " or: git diff [<options>] --cached [--merge-base] [ <commit>] [--] [<path>...]\n"
30
+ " or: git diff [<options>] [--merge-base] <commit> [<commit>...] <commit> [--] [<path>...]\n"
31
31
" or: git diff [<options>] <commit>...<commit>] [--] [<path>...]\n"
32
32
" or: git diff [<options>] <blob> <blob>]\n"
33
33
" or: git diff [<options>] --no-index [--] <path> <path>]\n"
You can’t perform that action at this time.
0 commit comments