Skip to content

Commit b5f19d5

Browse files
committed
Merge pull request #153 from mbolivar/fix-subtree-merge
Improve subtree merge command line.
2 parents f6593ca + 3d1b9aa commit b5f19d5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

book/07-git-tools/sections/subtree-merges.asc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,12 @@ $ git pull
6666
----
6767

6868
Then, we can merge those changes back into our `master` branch.
69-
We can use `git merge -s subtree` and it will work fine; but Git will also merge the histories together, which we probably don’t want.
70-
To pull in the changes and prepopulate the commit message, use the `--squash` and `--no-commit` options as well as the `-s subtree` strategy option:
69+
To pull in the changes and prepopulate the commit message, use the `--squash` and `--no-commit` options, as well as the recursive merge strategy's `-Xsubtree` option. (The recursive strategy is the default here, but we include it for clarity.)
7170

7271
[source,console]
7372
----
7473
$ git checkout master
75-
$ git merge --squash -s subtree --no-commit rack_branch
74+
$ git merge --squash -s recursive -Xsubtree=rack --no-commit rack_branch
7675
Squash commit -- not updating HEAD
7776
Automatic merge went well; stopped before committing as requested
7877
----

0 commit comments

Comments
 (0)