Commits tab in merge requests
The Commits tab in a merge request displays a sequential list of commits to the Git branch your merge request is based on. From this page, you can review full commit messages and copy a commit’s SHA when you need to cherry-pick changes.
Merge requests commit navigation
To seamlessly navigate among commits in a merge request:
- Select the Commits tab.
- Select a commit to open it in the single-commit view.
-
Navigate through the commits by either:
- Selecting Prev and Next buttons below the tab buttons.
- Using the X and C keyboard shortcuts.
View merge request commits in context
When reviewing a merge request, it helps to have more context about the changes made. That includes unchanged lines in unchanged files, and previous commits that have already merged that the change is built on.
To add previously merged commits to a merge request for more context:
- Go to your merge request.
- Select the Commits tab.
-
Scroll to the end of the list of commits, and select Add previously merged commits:
- Select the commits that you want to add.
- Select Save changes.
To view the changes done on those previously merged commits:
- On your merge request, select the Changes tab.
- Scroll to (file-tree) Compare and select previously merged commits: