Skip to content

Commit e81b8b3

Browse files
Merge pull request #25603 from github/sophie-5306
Merge Commit branch and tag labels page with About commits page
2 parents d11f852 + 88d5002 commit e81b8b3

File tree

8 files changed

+21
-28
lines changed

8 files changed

+21
-28
lines changed
Loading
Loading
23.9 KB
Loading
21.7 KB
Loading

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

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ redirect_from:
66
- /github/committing-changes-to-your-project/why-are-my-commits-in-the-wrong-order
77
- /github/committing-changes-to-your-project/about-commits
88
- /github/committing-changes-to-your-project/creating-and-editing-commits/about-commits
9+
- /pull-requests/committing-changes-to-your-project/viewing-and-comparing-commits/commit-branch-and-tag-labels
910
versions:
1011
fpt: '*'
1112
ghes: '*'
@@ -23,5 +24,22 @@ You can also create a commit on behalf of an organization. For more information,
2324

2425
Rebasing allows you to change a series of commits and can modify the order of the commits in your timeline. For more information, see "[About git rebase](/github/getting-started-with-github/about-git-rebase)."
2526

27+
## About commit branches and tag labels
28+
29+
You can see which branch a commit is on by looking at the labels beneath the commit on the commit page.
30+
31+
{% data reusables.repositories.navigate-to-repo %}
32+
{% data reusables.repositories.navigate-to-commit-page %}
33+
1. Navigate to the commit by clicking the commit message link.
34+
![Screenshot of commit with commit message link emphasized](/assets/images/help/commits/commit-message-link.png)
35+
2. To see what branch the commit is on, check the label below the commit message.
36+
![Screenshot of commit with commit branch indicator emphasized](/assets/images/help/commits/commit-branch-indicator.png)
37+
38+
If your commit is not on the default branch (`main`), the label will show the branches which contain the commit. If the commit is part of an unmerged pull request, you can click the link to go to the pull request.
39+
40+
Once the commit is on the default branch, any tags that contain the commit will be shown and the default branch will be the only branch listed. For more information on tags, see "[Git Basics - Tagging](https://git-scm.com/book/en/v2/Git-Basics-Tagging)" in the Git documentation.
41+
42+
![Screenshot of commit with commit tag emphasized](/assets/images/help/commits/commit-tag-label.png)
43+
2644
## Further reading
27-
- "[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 %}
45+
- "[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 %}

content/pull-requests/committing-changes-to-your-project/viewing-and-comparing-commits/commit-branch-and-tag-labels.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

content/pull-requests/committing-changes-to-your-project/viewing-and-comparing-commits/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ versions:
1010
ghae: '*'
1111
ghec: '*'
1212
children:
13-
- /commit-branch-and-tag-labels
1413
- /comparing-commits
1514
- /differences-between-commit-views
1615
shortTitle: View & compare commits
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1. On the main page of the repository, click the commits to navigate to the commits page.
2+
![Screenshot of the repository main page with the commits emphasized](/assets/images/help/commits/commits-page.png)

0 commit comments

Comments
 (0)