@@ -30,13 +30,9 @@ Git branches
3030 ``-c ``
3131 creates the branch to switch to.
3232
33- :samp: `$ git switch - `
34- alternates between the last two branches. This makes it much easier to jump
35- back and forth between branches.
36-
37- .. note ::
33+ .. version-added :: 2.24
3834
39- In Git < 2.23 , ``git switch `` is not yet available. In this case you
35+ Before Git 2.24 , ``git switch `` is not yet available. In this case you
4036 still need to use ``git checkout ``:
4137
4238 :samp: `$ git checkout [-b] [{ BRANCH_NAME } ] `
@@ -45,6 +41,10 @@ Git branches
4541 ``-b ``
4642 creates the specified branch if it does not already exist.
4743
44+ :samp: `$ git switch - `
45+ alternates between the last two branches. This makes it much easier to jump
46+ back and forth between branches.
47+
4848:samp: `$ git merge { FROM_BRANCH_NAME } `
4949 connects the specified branch with the branch you are currently in, for
5050 example:
@@ -76,6 +76,20 @@ Git branches
7676 is a merge strategy that is used when the merge is only to be done to
7777 ``HEAD ``.
7878
79+ :samp: `$ git merge-base [-a|--all] { COMMIT {COMMIT } `
80+ finds the best possible common ancestors for a merge.
81+
82+ .. _git-merge-base :
83+
84+ .. version-added :: 2.56
85+
86+ From Git 2.56 onwards, the search has improved considerably, particularly
87+ for so-called criss-cross merges.
88+
89+ .. seealso ::
90+ * `Stop searching history once no more merge bases can exist
91+ <https://github.blog/open-source/git/highlights-from-git-2-56/#h-stop-searching-history-once-no-more-merge-bases-can-exist> `_
92+
7993.. _merge-conflicts :
8094
8195Merge conflicts
@@ -101,6 +115,13 @@ The history can then look like this, for example:
101115 |/
102116 * 0c65f04 Initial commit
103117
118+ .. _git-add-resolved :
119+
120+ .. version-added :: 2.56
121+
122+ From Git 2.56 onwards, you can use ``git add --resolved `` to include only
123+ those paths that have not yet been merged into the index.
124+
104125.. seealso ::
105126
106127 * `Git Branching - Basic Branching and Merging
0 commit comments