Skip to content
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
16 changes: 10 additions & 6 deletions llvm/docs/GitHub.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,20 @@ Updating Pull Requests
----------------------
In order to update your pull request, the only thing you need to do is to push
your new commits to the branch in your fork. That will automatically update
the pull request.
the pull request. You can also use the Update Branch button in GitHub's Pull
Request UI, but be aware that it will create a merge commit on your branch.

When updating a pull request, you should push additional "fix up" commits to
your branch instead of force pushing. This makes it easier for GitHub to
track the context of previous review comments. Consider using the
`built-in support for fixups <https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---fixupamendrewordltcommitgt>`_
in git.

If you do this, you must squash and merge before landing the PR and
you must use the pull request title and description as the commit message.
You can do this manually with an interactive git rebase or with GitHub's
built-in tool. See the section about landing your fix below.
If you create fix up or merge commits, you must squash and merge before
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it still possible to do a non-squashed merge? Maybe via the CLI?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still allow direct pushes to main, so maybe the CLI allows for pushing a non-squashed merge?

landing the PR and you must use the pull request title and description as
the commit message. You can do this manually with an interactive git
rebase or with GitHub's built-in tool. See the section about landing your
fix below.

When pushing to your branch, make sure you push to the correct fork. Check your
remotes with:
Expand All @@ -108,7 +110,9 @@ Rebasing Pull Requests and Force Pushes
---------------------------------------
In general, you should avoid rebasing a Pull Request and force pushing to the
branch that's the root of the Pull Request during the review. This action will
make the context of the old changes and comments harder to find and read.
make the context of the old changes and comments harder to find and read. If
you want to make your pull request up-to-date with main, you might consider
updating your branch, as described in the previous section.

Sometimes, a rebase might be needed to update your branch with a fix for a test
or in some dependent code.
Expand Down
Loading