Pull requests and code review
Propose changes on a branch, get them reviewed, and merge through a pull request.
1. Open pull requests
Click the Pull requests tab on a repository to open
/{owner}/{repo}/pulls, or click New pull request to start one directly.2. Choose branches
On
/{owner}/{repo}/pulls/new, pick the Merge into (target) branch and the From (source) branch, add a Title and optional Description (markdown supported,@mentionsnotify teammates), then click Create pull request.3. Request review
On the pull request page, enter one or more usernames (comma-separated) under Reviewers and click Request review. Reviewers get a notification and can respond with Approve, Request changes, or Comment only.
4. Discuss changes
Use the Conversation tab for the description and general comments. On Files changed, click a line in the diff to leave a comment on that path and line. The same comment list holds both.
5. Suggest changes and apply with one click
Reviewers can suggest specific code replacements directly on any line: click a line number on the Files changed diff, then click the 💡 Insert suggestion button in the comment box (or write
suggestion ...in markdown). Collaborate renders a visual diff box showing the existing line (-) and proposed change (+). The PR author or any repository maintainer can click Apply suggestion on that comment to automatically create a commit on the PR source branch with the exact edit and co-author attribution (Co-authored-by: <Reviewer> <email>). No manual checkout or copy-pasting required.6. Merge or close
A maintainer clicks Merge pull request to merge (creating a merge commit on the target branch), or Close pull request to close it without merging. If the target branch has Require review to merge enabled (see Protected branches), the merge button stays disabled with an explanation until at least one approval exists with no outstanding change requests.
