Skip to main content

Merge and close pull requests

Resolve merge conflicts, and troubleshoot effectively before merging. Then merge, revert, or close pull requests on GitHub.

Resolving a merge conflict on GitHub

Resolve simple merge conflicts directly on GitHub using the conflict editor or handle complex cases via the command line.

Resolving a merge conflict using the command line

Resolve merge conflicts using the command line by identifying conflicting changes, editing files, and committing resolutions.

Troubleshooting required status checks

Resolve common errors and unblock merging or pushing to protected branches by troubleshooting required status checks.

Troubleshooting stacked pull requests

Resolve common problems with stacked pull requests, including rebase conflicts, blocked merges, interrupted operations, and merge queue issues.

Merging a pull request

Merge pull requests into the upstream branch, choose merge methods, and meet repository requirements like reviews or status checks.

Merging a pull request with a merge queue

Use merge queues in GitHub to streamline pull request merging, ensure required checks pass, and manage queue operations effectively.

Automatically merging a pull request

Enable or disable auto-merge for pull requests to streamline your workflow and automatically merge changes once all requirements are met.

Merging stacked pull requests

Merge a stack from the bottom up, individually, or in contiguous groups.

Optimizing CI for stacked pull requests

Understand how GitHub Actions workflows run for a stack, access stack metadata in your workflows, and reduce redundant CI usage.

Reverting a pull request

Create a new pull request to revert a previously merged pull request and address merge conflicts if they arise.

Closing a pull request

Close a pull request without merging it to manage unnecessary changes or address alternative solutions in other branches.