Skip to content

Commit bbaa0fc

Browse files
committed
Use the subtree command to push changes upstream.
1 parent 5574790 commit bbaa0fc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,14 @@ Pull Request as you would in the normal flow.
137137
What if you make changes in your repository and now want to push them upstream?
138138

139139
Assuming you just commited changes in the `java-repo-tools/` directory of your
140-
`my-main-branch`, to merge the changes into the local `java-repo-tools` branch,
141-
we need to cherry pick this commit using the subtree strategy. It will ignore
142-
any changes to file not in the `java-repo-tools/` directory.
140+
`my-main-branch`, to split the `java-repo-tools` changes into their own branch.
141+
The first time using the `subtree` command, we may need to use the `--rejoin`
142+
argument.
143143

144144
```
145-
git checkout java-repo-tools
146-
git cherry-pick -x --strategy=subtree my-main-branch
145+
git subtree split --prefix=java-repo-tools -b java-repo-tools-update-from-java-docs-samples
146+
git checkout java-repo-tools-update-from-java-docs-samples
147+
git push java-repo-tools java-repo-tools-update-from-java-docs-samples
147148
```
148149

149150
After you have committed all the changes you want to your `java-repo-tools`

0 commit comments

Comments
 (0)