Skip to content

Commit 906059d

Browse files
authored
Update about-git-subtree-merges.md
1 parent 660d664 commit 906059d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

content/github/using-git/about-git-subtree-merges.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,24 @@ The best way to explain subtree merges is to show by example. We will:
5555
> Receiving objects: 100% (1732/1732), 528.19 KiB | 621 KiB/s, done.
5656
> Resolving deltas: 100% (1086/1086), done.
5757
> From git://github.com/octocat/Spoon-Knife
58-
> * [new branch] main -> Spoon-Knife/main
58+
> * [new branch] main -> Spoon-Knife/master
5959
```
6060
2. Merge the `Spoon-Knife` project into the local Git project. This doesn't change any of your files locally, but it does prepare Git for the next step.
6161

6262
If you're using Git 2.9 or above:
6363
```shell
64-
$ git merge -s ours --no-commit --allow-unrelated-histories spoon-knife/main
64+
$ git merge -s ours --no-commit --allow-unrelated-histories spoon-knife/master
6565
> Automatic merge went well; stopped before committing as requested
6666
```
6767

6868
If you're using Git 2.8 or below:
6969
```shell
70-
$ git merge -s ours --no-commit spoon-knife/main
70+
$ git merge -s ours --no-commit spoon-knife/master
7171
> Automatic merge went well; stopped before committing as requested
7272
```
7373
3. Create a new directory called **spoon-knife**, and copy the Git history of the `Spoon-Knife` project into it.
7474
```shell
75-
$ git read-tree --prefix=spoon-knife/ -u spoon-knife/main
75+
$ git read-tree --prefix=spoon-knife/ -u spoon-knife/master
7676
```
7777
4. Commit the changes to keep them safe.
7878
```shell
@@ -99,7 +99,7 @@ $ git pull -s subtree <em>remotename</em> <em>branchname</em>
9999
For the example above, this would be:
100100

101101
```shell
102-
$ git pull -s subtree spoon-knife main
102+
$ git pull -s subtree spoon-knife master
103103
```
104104

105105
### Further reading

0 commit comments

Comments
 (0)