Update on GitHub pull requests

I am working on it, but I haven’t had enough time to do it as I hoped.

I think the github documentation is pretty good, and I also really recommend the GitHub CLI (cli.github.com).

Here what I have written as a overview so far:

  • Clone the repo gh repo clone llvm/llvm-project
  • Create a new branch git switch -c my_changes
  • Make your changes and create one or more commits. Remember that the LLVM project likes commits to be singular in purpose.
  • Run gh pr create this will ask you if you want to create a fork, select this value. It will walk you through doing the rest of the PR.
  • Reviewers will be assigned with the help of the CODEOWNERS file, but if that fails, assign some other reviewers.
  • If you need to update the PR, make your commits in your branch and push them to the branch in your fork. Don’t squash these commits yet, you want to show your changes as separate commits.
  • When the review is done, squash commits that are just follow-ups. This is easiest done with git rebase --interactive origin/main and mark the commits with f for fixup. There are also tools like git-absorb that can help with this process.
  • When the PR is accepted, you can use gh pr merge --delete-branch --rebase or click the rebase option in the web UI.

Hope this helps. I will try to get the documentation ready for review as soon as possible.

2 Likes