@@ -183,20 +183,34 @@ Here is an example for creating a Pull Request with the GitHub CLI:
183
183
# Commit your changes
184
184
git commit file.cpp -m "Code Review adjustments"
185
185
186
+ # Format changes
187
+ git clang-format HEAD~
188
+
189
+ # Recommit if any formatting changes
190
+ git commit -a --amend
191
+
186
192
# Push your changes to your fork branch, be mindful of
187
193
# your remotes here, if you don't remember what points to your
188
194
# fork, use git remote -v to see. Usually origin points to your
189
195
# fork and upstream to llvm/llvm-project
190
196
git push origin my_change
191
197
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:
195
200
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
200
214
201
215
# Now merge it
202
216
gh pr merge --squash --delete
@@ -281,7 +295,7 @@ checks:
281
295
282
296
::
283
297
284
- # Add upstream as a remote
298
+ # Add upstream as a remote (if you don't have it already)
285
299
git remote add upstream https://github.com/llvm/llvm-project.git
286
300
287
301
# Make sure you have all the latest changes
@@ -296,6 +310,11 @@ checks:
296
310
Once your PR is approved, rebased, and tests are passing, click `Squash and
297
311
Merge ` on your PR in the GitHub web interface.
298
312
313
+ See more in-depth information about how to contribute in the following documentation:
314
+
315
+ * :doc: `Contributing `
316
+ * :doc: `MyFirstTypoFix `
317
+
299
318
Releases
300
319
========
301
320
0 commit comments