As your codebase changes, you may find it useful to view specific commits to better understand what code changes occurred and why those changes were made. To do this in Google Cloud Source Repositories, use the Commit Details view.
This view displays detailed information about a specific commit, such as:
- Who made the commit
- When it was committed to the repository
- What files were changed
- What the specific changes were made
Components of the Commit Details view
The top left of the Commit Details view displays the hash of the commit and the parent hash. On the right, you can choose to browse the repository at a given point in time, or copy the full hash of the commit.
You can use this information to perform tasks such as copying the full SHA of a commit or navigating to the parent commit.
Directly below this section, you can find details such as:
- The commit message description
- The author of the commit
- The account that submitted the commit (if different than the author)
- The date at which the commit was committed to the repository
To learn which files were affected and what was changed, see the Files Changed section.
In this section, you can quickly see the number of files changed in the commit, along with a list of those files. The right side of this section displays a graphical representation of the changes to file contents:
- Red represents deletions
- Blue represents modifications
- Green represents additions
A small bar provides a visual representation of the distribution of these changes within a file. Next to this bar are the specific number of lines deleted, modified, or added.