Effective June 17, 2024, Cloud Source Repositories isn't available to new customers. If your organization hasn't previously used Cloud Source Repositories, you can't enable the API or use Cloud Source Repositories. New projects not connected to an organization can't enable the Cloud Source Repositories API. Organizations that have used Cloud Source Repositories prior to June 17, 2024 are not affected by this change.
Stay organized with collections
Save and categorize content based on your preferences.
You can use Cloud Source Repositories to browse to a file in a repository. You can
choose to view the latest version of the file, or select a specific version of
the file by choosing a branch, tag, or commit.
View the latest version of a file
For most Git repositories, the latest version of a file refers to the last
commit of the file in the master branch. You can get to this version of a file
from the All repositories page.
In the Google Cloud console, open Cloud Source Repositories.
The All repositories page opens. Alternatively, you can open the
My source
view.
Click a repository.
The Repository Root page opens.
On the Breadcrumb toolbar, click the Branch drop-down list,
click Commit, and then click the commit you want to view.
The view of the repository changes to reflect its state at the selected
commit.
Browse to the file you want to view and click it.
Navigate to the outline view
Cloud Source Repositories supports an outline view for many common types of files,
including those written in Java, C++, Python, JavaScript, and Go. The outline
view shows the structure of the file as a tree, where key identifiers are the
nodes. The outline view can help you understand the overall structure of a file
and navigate its contents.
In your repository, click the Files tab, browse to a file, and then
click the file.
Click the Outline tab.
Click an identifier to go to its starting location in the file.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Browsing files\n\nYou can use Cloud Source Repositories to browse to a file in a repository. You can\nchoose to view the latest version of the file, or select a specific version of\nthe file by choosing a branch, tag, or commit.\n\nView the latest version of a file\n---------------------------------\n\nFor most Git repositories, the latest version of a file refers to the last\ncommit of the file in the `master` branch. You can get to this version of a file\nfrom the **All repositories** page.\n\n1. In the Google Cloud console, open Cloud Source Repositories.\n\n [Open Cloud Source Repositories](https://source.cloud.google.com/repos)\n\n The **All repositories** page opens. Alternatively, you can open the\n [My source](/source-repositories/docs/browsing-repositories#browse_to_a_repository)\n view.\n2. Click a repository.\n\n The **Repository Root** page opens.\n3. In the **Files** list, browse to the file you want to view, and then click\n it.\n\nView a file by using a different branch\n---------------------------------------\n\n1. In the Google Cloud console, open Cloud Source Repositories.\n\n [Open Cloud Source Repositories](https://source.cloud.google.com/repos)\n\n The **All repositories** page opens. Alternatively, you can open the\n [My source](/source-repositories/docs/browsing-repositories#browse_to_a_repository)\n view.\n2. Click a repository.\n\n The **Repository Root** page opens.\n3. On the Breadcrumb toolbar, click the **Branch** drop-down list,\n click **Branch**, and then click the branch you want to view.\n\n The repository view changes to reflect the selected branch.\n4. Browse to the file you want to view and click it.\n\nView a file by using a different tag\n------------------------------------\n\n1. In the Google Cloud console, open Cloud Source Repositories.\n\n [Open Cloud Source Repositories](https://source.cloud.google.com/repos)\n\n The **All repositories** page opens. Alternatively, you can open the\n [My source](/source-repositories/docs/browsing-repositories#browse_to_a_repository)\n view.\n2. Click a repository.\n\n The **Repository Root** page opens.\n3. On the Breadcrumb toolbar, click the **Branch** drop-down list,\n click **Tag**, and then click the tag you want to view.\n\n The repository view changes to reflect the selected tag.\n4. Browse to the file you want to view and click it.\n\nView a file at a different commit\n---------------------------------\n\n1. In the Google Cloud console, open Cloud Source Repositories.\n\n [Open Cloud Source Repositories](https://source.cloud.google.com/repos)\n\n The **All repositories** page opens. Alternatively, you can open the\n [My source](/source-repositories/docs/browsing-repositories#browse_to_a_repository)\n view.\n2. Click a repository.\n\n The **Repository Root** page opens.\n3. On the Breadcrumb toolbar, click the **Branch** drop-down list,\n click **Commit**, and then click the commit you want to view.\n\n The view of the repository changes to reflect its state at the selected\n commit.\n4. Browse to the file you want to view and click it.\n\nNavigate to the outline view\n----------------------------\n\nCloud Source Repositories supports an outline view for many common types of files,\nincluding those written in Java, C++, Python, JavaScript, and Go. The outline\nview shows the structure of the file as a tree, where key identifiers are the\nnodes. The outline view can help you understand the overall structure of a file\nand navigate its contents.\n\n1. In your repository, click the **Files** tab, browse to a file, and then\n click the file.\n\n2. Click the **Outline** tab.\n\n3. Click an identifier to go to its starting location in the file."]]