Skip to content

Aligning the section about pull-request with the gh tools with the section using the web UI #65795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions llvm/docs/GitHub.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
========

Expand Down