Skip to content

Commit 6ee0542

Browse files
committed
Use subtree command instead of git plumbing.
This should make it easier to push upstream and pull downstream.
1 parent 9315c4d commit 6ee0542

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

README.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,20 @@ git fetch java-repo-tools master
2828
```
2929

3030
We can then go back to the `my-java-samples` code and prepare a Pull Request to
31-
add the `java-repo-tools` code in a subtree.
32-
33-
```
34-
git checkout master
35-
# Making a new branch ia optional, but recommended to send a pull request to
36-
# start using java-repo-tools.
37-
git checkout -b use-java-repo-tools
38-
```
39-
40-
So that we can pull future updates from the `java-repo-tools` repository, we
41-
merge histories. This way we won't get unnecessary conflicts when pulling changes
42-
in.
31+
add the `java-repo-tools` code in a subtree. Making a new branch is optional, but
32+
recommended so that you can more easily send a pull request to start using
33+
`java-repo-tools`.
4334

4435
```
45-
git merge -s ours --no-commit java-repo-tools/master
36+
git checkout -b use-java-repo-tools origin/master
4637
```
4738

48-
Finally, read the `java-repo-tools` into a subtree.
39+
Finally, read the `java-repo-tools` into a subtree. So that you can pull future
40+
updates from the `java-repo-tools` repository, this command will merge histories.
41+
This way prevents unnecessary conflicts when pulling changes in.
4942

5043
```
51-
git read-tree --prefix=java-repo-tools/ -u java-repo-tools/master
44+
git subtree add --prefix=java-repo-tools java-repo-tools master
5245
```
5346

5447
Now all the content of `java-repo-tools` will be in the `java-repo-tools/`

0 commit comments

Comments
 (0)