Following the history of a file

When viewing a file in Google Cloud Source Repositories, use the Blame or History options to learn more about changes to the file view, such as what lines changed and when.

Viewing the Blame panel

The Blame panel displays information about who made what change to a file and when.

For each line in the file, this panel displays:

  • The name of the user who authored the commit
  • A number that indicates when the change occurred in the history of that file

A username and change number can appear multiple times for a given file. For example, if a user changed multiple lines in a file and submitted those changes in a single commit, each affected line would contain the same username and change number.

To open the Blame panel:

  1. From the My Source or All Repositories view, select a repository.

    The File view opens.

  2. Browse to the file you want to view and select it.

  3. Click BLAME, located in the upper-right corner.

    Blame link

View additional details about a commit

To view additional details about a change to the file, hover over the change number. A Commit Details window appears, which displays information such as:

  • The Commit ID
  • A description of the commit
  • The author commit date
  • The name of the author

Viewing the history of a file

You can also learn about how a file changed over time through the History option. This option opens a Change History section, which contains information about each commit that affected the file.

You can view the history for a file from the File view or the Blame layer.

File view

  1. From the My Source or All Repositories view, select a repository.

    The File view opens.

  2. Browse to the file you want to view and select it.

  3. Click the History link in the upper right corner. The Commit History panel displays a list of commits. Each row displays the hash for that commit as a hyperlink.

Blame layer

  1. From the My Source or All Repositories view, select a repository.

    The File view opens.

  2. Browse to the file you want to view and select it.

  3. Click BLAME, located in the upper-right corner.

    Blame link

  4. Choose one of the following options:

    • Click the change number
    • Open the Commit Details window and select Show in Change History

Open a file as it existed for a specific commit

  1. Open the Change History panel using either the Blame panel or the Change History panel.

    The Change History panel opens.

  2. Locate the commit.

  3. Hover over that commit's row.

    A View button displays on the same row as the commit.

  4. Click View.

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Source Repositories