Pull requests display diffs to compare the changes you made in your topic branch against the base branch that you want to merge your changes into.

Note: When creating your pull request, you can change the base branch that you're comparing your changes against. For more information, see "Creating a pull request."

You can view proposed changes in a pull request in the Files changed tab.

Pull Request Files changed tab

The diff shows a comparison between the tip of the head branch and the commit at which the head was last synced with the base branch. Rather than viewing the commits themselves, you can view the proposed changes as they'll appear in the files once the pull request is merged. The files appear in alphabetical order within the Files changed tab. Additions to the files appear in green and are prefaced by a + sign while content that has been removed appears in red and is prefaced by a - sign.

You can choose to view the diff in either a unified view, where the modified content appears in a linear view, or a split view, where old content appears on one side and new content appears on the other side.

You can also choose to view either the source or the rich diff. Viewing the rich diff lets you see a preview of how the changes will look once the pull request is merged.

Tip: If you're having a hard time understanding the context of a change, you can click View in the Files changed tab to view the whole file with the proposed changes.

Reasons diffs will not display

Further reading