Skip to content

Commit 6b6312b

Browse files
authored
Aligning the section about pull-request with the gh tools with the section using the web UI (#65795)
This is fairly minor, but start addressing the post-review comments
1 parent c5525a6 commit 6b6312b

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

llvm/docs/GitHub.rst

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,20 +183,34 @@ Here is an example for creating a Pull Request with the GitHub CLI:
183183
# Commit your changes
184184
git commit file.cpp -m "Code Review adjustments"
185185

186+
# Format changes
187+
git clang-format HEAD~
188+
189+
# Recommit if any formatting changes
190+
git commit -a --amend
191+
186192
# Push your changes to your fork branch, be mindful of
187193
# your remotes here, if you don't remember what points to your
188194
# fork, use git remote -v to see. Usually origin points to your
189195
# fork and upstream to llvm/llvm-project
190196
git push origin my_change
191197

192-
# When your PR is accepted, you can now rebase it and make sure
193-
# you have all the latest changes.
194-
git rebase -i origin/main
198+
Before merging the PR, it is recommended that you rebase locally and re-run test
199+
checks:
195200

196-
# If this PR is older and you get a lot of new commits with the
197-
# rebase, you might want to re-run tests and make sure nothing
198-
# broke.
199-
ninja check-llvm
201+
::
202+
203+
# Add upstream as a remote (if you don't have it already)
204+
git remote add upstream https://github.com/llvm/llvm-project.git
205+
206+
# Make sure you have all the latest changes
207+
git fetch upstream && git rebase -i upstream/main
208+
209+
# Make sure tests pass with latest changes and your change
210+
ninja check
211+
212+
# Push the rebased changes to your fork.
213+
git push origin my_change -f
200214

201215
# Now merge it
202216
gh pr merge --squash --delete
@@ -281,7 +295,7 @@ checks:
281295

282296
::
283297

284-
# Add upstream as a remote
298+
# Add upstream as a remote (if you don't have it already)
285299
git remote add upstream https://github.com/llvm/llvm-project.git
286300

287301
# Make sure you have all the latest changes
@@ -296,6 +310,11 @@ checks:
296310
Once your PR is approved, rebased, and tests are passing, click `Squash and
297311
Merge` on your PR in the GitHub web interface.
298312

313+
See more in-depth information about how to contribute in the following documentation:
314+
315+
* :doc:`Contributing`
316+
* :doc:`MyFirstTypoFix`
317+
299318
Releases
300319
========
301320

0 commit comments

Comments
 (0)