Merge branch 'dl/branch-from-3dot-merge-base'
"git branch new A...B" and "git checkout -b new A...B" have been taught that in their contexts, the notation A...B means "the merge base between these two commits", just like "git checkout A...B" detaches HEAD at that commit. * dl/branch-from-3dot-merge-base: branch: make create_branch accept a merge base rev t2018: cleanup in current test
This commit is contained in:
@ -45,7 +45,11 @@ argument is missing it defaults to `HEAD` (i.e. the tip of the current
|
||||
branch).
|
||||
|
||||
The command's second form creates a new branch head named <branchname>
|
||||
which points to the current `HEAD`, or <start-point> if given.
|
||||
which points to the current `HEAD`, or <start-point> if given. As a
|
||||
special case, for <start-point>, you may use `"A...B"` as a shortcut for
|
||||
the merge base of `A` and `B` if there is exactly one merge base. You
|
||||
can leave out at most one of `A` and `B`, in which case it defaults to
|
||||
`HEAD`.
|
||||
|
||||
Note that this will create the new branch, but it will not switch the
|
||||
working tree to it; use "git checkout <newbranch>" to switch to the
|
||||
|
@ -313,6 +313,10 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
|
||||
<start_point>::
|
||||
The name of a commit at which to start the new branch; see
|
||||
linkgit:git-branch[1] for details. Defaults to HEAD.
|
||||
+
|
||||
As a special case, you may use `"A...B"` as a shortcut for the
|
||||
merge base of `A` and `B` if there is exactly one merge base. You can
|
||||
leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
|
||||
|
||||
<tree-ish>::
|
||||
Tree to checkout from (when paths are given). If not specified,
|
||||
|
Reference in New Issue
Block a user