Skip to content

Commit d156201

Browse files
committed
Add much easier steps for pulling in changes
The instructions here are much easier to follow and avoid unnecessary conflicts: https://help.github.com/articles/about-git-subtree-merges/
1 parent 810d4a7 commit d156201

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

README.md

+6-14
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,12 @@ If you haven't done this before, run
9696

9797
```
9898
git remote add java-repo-tools [email protected]:GoogleCloudPlatform/java-repo-tools.git
99-
git fetch java-repo-tools master
100-
# Optional, but it makes pushing changes upstream easier.
101-
git checkout -b java-repo-tools java-repo-tools/master
10299
```
103100

104101
To detect if you have changes in the directory, run
105102

106103
```
107-
git fetch java-repo-tools
104+
git fetch java-repo-tools master
108105
git diff-tree -p HEAD:java-repo-tools/ java-repo-tools/master
109106
```
110107

@@ -124,25 +121,16 @@ To update the `java-repo-tools` directory, if you haven't done this before, run
124121

125122
```
126123
git remote add java-repo-tools [email protected]:GoogleCloudPlatform/java-repo-tools.git
127-
git fetch java-repo-tools master
128-
git checkout -b java-repo-tools java-repo-tools/master
129124
```
130125

131126
To pull the latest changes from this `java-repo-tools` repository, run:
132127

133-
```
134-
git checkout java-repo-tools
135-
git pull java-repo-tools master
136-
```
137-
138-
Pull them into the main code.
139-
140128
```
141129
git checkout master
142130
# Making a new branch is optional, but recommended to send a pull request for
143131
# update.
144132
git checkout -b update-java-repo-tools
145-
git merge --squash -Xsubtree=java-repo-tools/ --no-commit java-repo-tools
133+
git pull -s subtree java-repo-tools master
146134
```
147135

148136
Then you can make any needed changes to make the rest of the repository
@@ -176,6 +164,10 @@ git push java-repo-tools java-repo-tools:name-for-remote-branch
176164
Then, you can send a pull request to the `java-repo-tools` repository.
177165

178166

167+
## References
168+
169+
- [GitHub's subtree merge reference](https://help.github.com/articles/about-git-subtree-merges/)
170+
179171
## Contributing changes
180172

181173
- See [CONTRIBUTING.md](CONTRIBUTING.md)

0 commit comments

Comments
 (0)