7.2 KiB
stage, group, info, description, title
stage | group | info | description | title |
---|---|---|---|---|
Create | Source Code | To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments | View information about a repository's commit history. | Commits |
{{< details >}}
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
{{< /details >}}
The Commits list displays the commit history for your repository. Use it to browse code changes, view commit details, and verify commit signatures. You can filter the commit list by Git revision to see the changes for a specific revision.
The list shows:
- Commit hash: Unique identifier (SHA) for each commit.
- Commit message: Title and description of the commit.
- Author: Name and avatar of the user who made the commit.
- Timestamp: When the commit was created.
- Pipeline status: CI/CD pipeline results, if configured.
- Signature verification: GPG, SSH, or X.509 signature status.
- Tags: Any tags pointing to this commit.
View commits
To view your repository's commit history:
- On the left sidebar, select Search or go to and find your project.
- Select Code > Commits.
To view a commit's summary, select the Toggle commit description icon ({{< icon name="ellipsis_h">}}). This summary does not display file changes or statistics.
View commit details
Examine the specific changes made in any commit, including file modifications, additions, and deletions.
To view a commit's details:
- On the left sidebar, select Search or go to and find your project.
- Select Code > Commits.
- Select the commit to open the commit's details page.
The commit's details page shows:
- Commit information: Commit hash, author, committer, parent commits, and timestamp.
- Commit message: Title and description of the commit.
- File changes: All modified files with diff view.
- Statistics: Number of lines changed, added, and removed.
- Pipeline details: Associated CI/CD pipeline status and details.
- References: Branches and tags containing this commit.
- Related merge requests: Links to merge requests associated with the commit.
Browse repository files by Git revision
To view all repository files and folders at a specific Git revision, such as a commit SHA, branch name, or tag:
- On the left sidebar, select Search or go to and find your project.
- Select Code > Commits.
- Choose one of the following options:
- Filter by Git revision:
- At the top, select to open the Select Git revision dropdown list.
- Select or search for a Git revision.
- Select a specific commit from the commits list.
- Filter by Git revision:
- At the top right, select Browse files.
You are directed to the repository page at that specific revision.
Filter and search commits
Filter and search the commit history to find specific changes or track work by particular authors.
Filter by author
To filter commits by a specific author:
- On the left sidebar, select Search or go to and find your project.
- Select Code > Commits.
- In the Author dropdown list, select or search for the author's name or username.
If author filtering doesn't work for names with special characters, use the URL parameter format.
For example, append ?author=Elliot%20Stevens
to the URL.
Filter by Git revision
To filter commits by Git revision, such as branch, tag, or commit SHA:
- On the left sidebar, select Search or go to and find your project.
- Select Code > Commits.
- In the dropdown list, select or search for a Git revision. For example, branch name, tag, or commit SHA.
- Select the Git revision to view the list of filtered commits.
Search by commit message
To search for commits by message content:
- On the left sidebar, select Search or go to and find your project.
- Select Code > Commits.
- In the Search by message field, enter your search terms.
You can also search by commit SHA, full or partial, to find a specific commit directly.
Cherry-pick a commit
Apply changes from a specific commit to another.
Prerequisites:
- You must have at least the Developer role for the project.
- The target branch must exist.
To cherry-pick a commit:
- On the left sidebar, select Search or go to and find your project.
- Select Code > Commits.
- Select the commit you want to cherry-pick.
- In the upper-right corner, select Options and then Cherry-pick.
- In the dialog:
- From the dropdown lists, select the target project and branch.
- Optional: Select Start a new merge request to create a merge request with the changes.
- Select Cherry-pick.
GitLab creates a new commit on the target branch with the cherry-picked changes. If the branch is protected or you don't have the correct permissions, GitLab prompts you to create a new merge request.
Revert a commit
Create a new commit that undoes changes from a previous commit.
Prerequisites:
- You must have at least the Developer role for the project.
To revert a commit:
- On the left sidebar, select Search or go to and find your project.
- Select Code > Commits.
- Select the commit you want to revert.
- In the upper-right corner, select Options and then Revert.
- In the dialog:
- Select the target branch for the revert commit.
- Optional: Select Start a new merge request to create a merge request.
- Select Revert.
GitLab creates a new commit that reverses the changes from the selected commit. If the branch is protected or you don't have the correct permissions, GitLab prompts you to create a new merge request.
Download commit contents
To download a commit's diff contents:
- On the left sidebar, select Search or go to and find your project.
- Select Code > Commits.
- Select the commit you want to download.
- In the upper-right corner, select Options.
- Under Downloads, select Plain Diff.
Verify commit signatures
GitLab verifies GPG, SSH, and X.509 signatures to ensure commit authenticity. Verified commits show a Verified badge.
For more information, see signed commits.
View signature details
To view signature information:
- On the left sidebar, select Search or go to and find your project.
- Select Code > Commits.
- Find a commit with a Verified or Unverified badge.
- Select the badge to view signature details including:
- Signature type (GPG, SSH, or X.509)
- Key fingerprint
- Verification status
- Signer identity
View pipeline status and details
The commit list includes a CI/CD pipeline status icon next to each commit. To view the pipeline details:
- On the left sidebar, select Search or go to and find your project.
- Select Code > Commits.
- Select the pipeline status icon next to any commit.