[llvm] 6b6312b - Aligning the section about pull-request with the `gh` tools with the section using the web UI (#65795)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 12:43:01 PDT 2023


Author: Mehdi Amini
Date: 2023-09-08T12:42:57-07:00
New Revision: 6b6312b01d1f6966865dc0156c8837e0fc6d52eb

URL: https://github.com/llvm/llvm-project/commit/6b6312b01d1f6966865dc0156c8837e0fc6d52eb
DIFF: https://github.com/llvm/llvm-project/commit/6b6312b01d1f6966865dc0156c8837e0fc6d52eb.diff

LOG: 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

Added: 
    

Modified: 
    llvm/docs/GitHub.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/GitHub.rst b/llvm/docs/GitHub.rst
index bb9fa6fce27e8b..34dda79ed8f6f4 100644
--- a/llvm/docs/GitHub.rst
+++ b/llvm/docs/GitHub.rst
@@ -183,20 +183,34 @@ Here is an example for creating a Pull Request with the GitHub CLI:
   # Commit your changes
   git commit file.cpp -m "Code Review adjustments"
 
+  # Format changes
+  git clang-format HEAD~
+
+  # Recommit if any formatting changes
+  git commit -a --amend
+
   # Push your changes to your fork branch, be mindful of
   # your remotes here, if you don't remember what points to your
   # fork, use git remote -v to see. Usually origin points to your
   # fork and upstream to llvm/llvm-project
   git push origin my_change
 
-  # When your PR is accepted, you can now rebase it and make sure
-  # you have all the latest changes.
-  git rebase -i origin/main
+Before merging the PR, it is recommended that you rebase locally and re-run test
+checks:
 
-  # If this PR is older and you get a lot of new commits with the
-  # rebase, you might want to re-run tests and make sure nothing
-  # broke.
-  ninja check-llvm
+::
+
+  # Add upstream as a remote (if you don't have it already)
+  git remote add upstream https://github.com/llvm/llvm-project.git
+
+  # Make sure you have all the latest changes
+  git fetch upstream && git rebase -i upstream/main
+
+  # Make sure tests pass with latest changes and your change
+  ninja check
+
+  # Push the rebased changes to your fork.
+  git push origin my_change -f
 
   # Now merge it
   gh pr merge --squash --delete
@@ -281,7 +295,7 @@ checks:
 
 ::
 
-  # Add upstream as a remote
+  # Add upstream as a remote (if you don't have it already)
   git remote add upstream https://github.com/llvm/llvm-project.git
 
   # Make sure you have all the latest changes
@@ -296,6 +310,11 @@ checks:
 Once your PR is approved, rebased, and tests are passing, click `Squash and
 Merge` on your PR in the GitHub web interface.
 
+See more in-depth information about how to contribute in the following documentation:
+
+* :doc:`Contributing`
+* :doc:`MyFirstTypoFix`
+
 Releases
 ========
 


        


More information about the llvm-commits mailing list