Skip to content

Commit 6c7319a

Browse files
vgrlthispaul
andauthored
[2022-06-13]: 🎁 Users can browse files of a commit using a tree view on the Commit page [GA] (github#28289)
Co-authored-by: Paul Loeb <[email protected]>
1 parent 81d81dd commit 6c7319a

File tree

5 files changed

+34
-4
lines changed

5 files changed

+34
-4
lines changed
Binary file not shown.
71.5 KB
Loading

content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ You can filter files in a pull request by file extension type, such as `.html` o
4040
{% data reusables.repositories.sidebar-pr %}
4141
1. In the list of pull requests, click the pull request you'd like to filter.
4242
{% data reusables.repositories.changed-files %}
43-
1. If the file tree is hidden, click **Show file tree** to display the file tree.
43+
44+
1. Click on a file in the file tree to view the corresponding file diff. If the file tree is hidden, click {% octicon "sidebar-collapse" aria-label="The sidebar collapse icon" %} to display the file tree.
4445

4546
{% note %}
4647

4748
**Note**: The file tree will not display if your screen width is too narrow or if the pull request only includes one file.
4849

4950
{% endnote %}
50-
51-
1. Click on a file in the file tree to view the corresponding file diff.
52-
![Pull request file tree](/assets/images/help/pull_requests/pr-file-tree.png)
51+
52+
![Screenshot of filter changed files search box and file tree emphasized](/assets/images/help/repository/file-tree.png)
5353
1. To filter by file path, enter part or all of the file path in the **Filter changed files** search box. Alternatively, use the file filter dropdown. For more information, see "[Using the file filter dropdown](#using-the-file-filter-dropdown)."
5454

5555
{% endif %}

content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/about-commits.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,28 @@ Once the commit is on the default branch, any tags that contain the commit will
4141

4242
![Screenshot of commit with commit tag emphasized](/assets/images/help/commits/commit-tag-label.png)
4343

44+
{% ifversion commit-tree-view %}
45+
46+
## Using the file tree
47+
48+
You can use the file tree to navigate between files in a commit.
49+
50+
{% data reusables.repositories.navigate-to-repo %}
51+
{% data reusables.repositories.navigate-to-commit-page %}
52+
1. Navigate to the commit by clicking the commit message link.
53+
![Screenshot of commit with commit message link emphasized](/assets/images/help/commits/commit-message-link.png)
54+
1. Click on a file in the file tree to view the corresponding file diff. If the file tree is hidden, click {% octicon "sidebar-collapse" aria-label="The sidebar collapse icon" %} to display the file tree.
55+
56+
{% note %}
57+
58+
**Note**: The file tree will not display if your screen width is too narrow or if the commit only includes one file.
59+
60+
{% endnote %}
61+
62+
![Screenshot of filter changed files search box and file tree emphasized](/assets/images/help/repository/file-tree.png)
63+
1. To filter by file path, enter part or all of the file path in the **Filter changed files** search box.
64+
65+
{% endif %}
66+
4467
## Further reading
4568
- "[Committing and reviewing changes to your project](/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project#about-commits)" on {% data variables.product.prodname_desktop %}

data/features/commit-tree-view.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Issue 6662
2+
# Commit file tree view
3+
versions:
4+
fpt: '*'
5+
ghec: '*'
6+
ghes: '>=3.6'
7+
ghae: 'issue-6662'

0 commit comments

Comments
 (0)