aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-branch.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-05-19 16:45:28 +0900
committerJunio C Hamano <gitster@pobox.com>2019-05-19 16:45:28 +0900
commit4ac8371a1ce0df07a2c3389d6acf6c35207a54fa (patch)
tree0570de778821f4b158c6d7287843b906d68c5b33 /Documentation/git-branch.txt
parent3c9b393ca8fdb4db53e461a6f506dd10ed6fbc85 (diff)
parente3d6539d58238f046ff955330f6e10c447150164 (diff)
downloadgit-4ac8371a1ce0df07a2c3389d6acf6c35207a54fa.tar.gz
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
Diffstat (limited to 'Documentation/git-branch.txt')
-rw-r--r--Documentation/git-branch.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 0cd87ddeff..6ebd512b4f 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -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