Skip to content

Commit c693ef7

Browse files
Denton-Lgitster
authored andcommitted
Doc: document "A...B" form for <tree-ish> in checkout and switch
Using "A...B" has been supported for the <tree-ish> argument for a while. However, its support has never been explicitly documented. Explicitly document it so that users know that it is available. Signed-off-by: Denton Liu <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5602b50 commit c693ef7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Documentation/git-checkout.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,10 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
350350
<tree-ish>::
351351
Tree to checkout from (when paths are given). If not specified,
352352
the index will be used.
353+
+
354+
As a special case, you may use `"A...B"` as a shortcut for the
355+
merge base of `A` and `B` if there is exactly one merge base. You can
356+
leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
353357

354358
\--::
355359
Do not interpret any more arguments as options.

Documentation/git-restore.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ OPTIONS
4040
+
4141
If not specified, the contents are restored from `HEAD` if `--staged` is
4242
given, otherwise from the index.
43+
+
44+
As a special case, you may use `"A...B"` as a shortcut for the
45+
merge base of `A` and `B` if there is exactly one merge base. You can
46+
leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
4347

4448
-p::
4549
--patch::

0 commit comments

Comments
 (0)