Skip to content

Commit 873c347

Browse files
Michael J Grubergitster
authored andcommitted
Documentation: A...B shortcut for checkout and rebase
Describe the A...B shortcuts for checkout and rebase [-i] which were introduced in these commits: 619a64e ("checkout A...B" switches to the merge base between A and B, 2009-10-18) 61dfa1b ("rebase --onto A...B" replays history on the merge base between A and B, 2009-11-20) 230a456 (rebase -i: teach --onto A...B syntax, 2010-01-07) Signed-off-by: Michael J Gruber <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 41e4d69 commit 873c347

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
@@ -136,6 +136,10 @@ edits from your current working tree.
136136
As a special case, the `"@\{-N\}"` syntax for the N-th last branch
137137
checks out the branch (instead of detaching). You may also specify
138138
`-` which is synonymous with `"@\{-1\}"`.
139+
+
140+
As a further special case, you may use `"A...B"` as a shortcut for the
141+
merge base of `A` and `B` if there is exactly one merge base. You can
142+
leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
139143

140144
<new_branch>::
141145
Name for the new branch.

Documentation/git-rebase.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ OPTIONS
206206
--onto option is not specified, the starting point is
207207
<upstream>. May be any valid commit, and not just an
208208
existing branch name.
209+
+
210+
As a special case, you may use "A...B" as a shortcut for the
211+
merge base of A and B if there is exactly one merge base. You can
212+
leave out at most one of A and B, in which case it defaults to HEAD.
209213

210214
<upstream>::
211215
Upstream branch to compare against. May be any valid commit,

0 commit comments

Comments
 (0)