Skip to content

Commit ba6aa68

Browse files
committed
Update GitHub flow documentation to correct step numbering and clarify branch naming conventions
1 parent 2eddd0f commit ba6aa68

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

content/6-github-flow.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
The [GitHub flow][github-flow] is a lightweight, [branch-based][about-branches] workflow. It's designed to allow for free testing and exploration of ideas and novel approaches which are then reviewed and, if accepted, brought into the codebase. At a high level, the GitHub flow follows this pattern:
77

88
1. Create a branch
9-
1. Make the desired changes
10-
1. Create a [pull request][about-prs]
11-
1. Review changes, gather feedback and make updates
12-
1. Review results of automated operations such as testing for continuous integration
13-
1. If changes are approved, merge into codebase
9+
2. Make the desired changes
10+
3. Create a [pull request][about-prs]
11+
4. Review changes, gather feedback and make updates
12+
5. Review results of automated operations such as testing for continuous integration
13+
6. If changes are approved, merge into codebase
1414

1515
The GitHub flow is designed to work as a cycle, where contributors continuously explore, test, review, and build upon their work and the work of others.
1616

@@ -19,7 +19,7 @@ The GitHub flow is designed to work as a cycle, where contributors continuously
1919
2020
## Scenario
2121

22-
With the code changes created in the [prior exercise][code-exercise], it's time to walk through the GitHub flow to create a pull request and incorporate the updates into the codebase. While the changes have already been made (meaning we are slightly out of order from the "traditional" flow), you can still perform the steps to explore.
22+
With the code changes created in the [prior exercise][walkthrough-previous], it's time to walk through the GitHub flow to create a pull request and incorporate the updates into the codebase. While the changes have already been made (meaning we are slightly out of order from the "traditional" flow), you can still perform the steps to explore.
2323

2424
## Creating a branch
2525

@@ -28,11 +28,11 @@ A [branch][about-branches] is a copy of the code stored in the same repository.
2828
There are different ways to create a branch when using [GitHub Codespaces][github-codespaces]. You can utilize the command-line to run [git](https://git-scm.com/docs/git-branch) commands. You can use the Source Control pane in your codespace to get the support of the UI for creating your branch. In our example we're going to use the command-line to create the branch.
2929

3030
1. Return to your codespace, or reopen it by navigating to your repository and selecting **Code** > **Codespaces** and the name of your codespace.
31-
2. Open a **terminal window** by pressing <kbd>Ctl</kbd> + <kbd>`</kbd>.
32-
3. In the terminal window, enter the following command to create and switch to a new branch named `add-filter`:
31+
2. Open a **terminal window** by pressing <kbd>Ctl</kbd> + <kbd>\`</kbd>.
32+
3. In the terminal window, enter the following command to create and switch to a new branch named `add-flag`:
3333

3434
```bash
35-
git checkout -b add-filter
35+
git checkout -b add-flag
3636
```
3737

3838
4. Stage all code to be committed to the new branch by entering the following command in the terminal window:
@@ -49,7 +49,7 @@ There are different ways to create a branch when using [GitHub Codespaces][githu
4949
7. Finally, push the new branch to the repository by entering the following command in the terminal window:
5050

5151
```bash
52-
git push -u origin add-filter
52+
git push -u origin add-flag
5353
```
5454

5555
## Create the pull request to suggest updates
@@ -59,16 +59,16 @@ A [pull request][about-prs] is a request to pull or incorporate new code into th
5959
Pull requests can be made through the source control pane in the codespace, the repository's website, or through the command-line using the [GitHub CLI][github-cli]. In our example we're going to create the pull request in the CLI, then navigate to the website to see the pull request and the actions running, and merge the code into the codebase.
6060

6161
1. Return to your codespace.
62-
1. Find the number for the [issue you created earlier][issues-exercise] titled **Add component to display hours** by entering the following command in the terminal window:
62+
2. Find the number for the [issue you created earlier][issues-exercise] titled **Add component to display hours** by entering the following command in the terminal window:
6363

6464
```bash
6565
gh issue list
6666
```
6767

68-
1. Create a pull request with the title **Add hours component** and body **Resolves #\<ISSUE_NUMBER\>**, replacing **\<ISSUE_NUMBER\>** with the issue number you obtained in the previous step by entering the following command in the terminal window:
68+
3. Create a pull request with the title **Add adoption status flag** and body **Resolves #\<ISSUE_NUMBER\>**, replacing **\<ISSUE_NUMBER\>** with the issue number you obtained in the previous step by entering the following command in the terminal window:
6969

7070
```bash
71-
gh pr create -t "Add hours component" -b "Resolves #<ISSUE_NUMBER>"
71+
gh pr create -t "Add adoption status flag" -b "Resolves #<ISSUE_NUMBER>"
7272
```
7373

7474
## Explore and merge the pull request
@@ -80,8 +80,8 @@ In our scenario, we created an automated workflow for front-end tests for our ap
8080
Let's explore the pull request and watch the workflows run. We'll ensure the tests now run successfully and, assuming they do, merge the pull request.
8181
8282
1. Follow the link displayed in the terminal window by using <kbd>Ctl</kbd> - **Click** (or <kbd>Cmd</kbd> - **Click** on a Mac).
83-
1. In the page displayed, note the workflow running the [end-to-end tests created earlier][testing-exercise] and [code scanning][security-exercise].
84-
1. When the workflows complete successfully, select **Merge pull request** to merge your changes into the **main** branch.
83+
2. In the page displayed, note the workflow running the [end-to-end tests created earlier][testing-exercise] and [code scanning][security-exercise].
84+
3. When the workflows complete successfully, select **Merge pull request** to merge your changes into the **main** branch.
8585
8686
Congratulations! You've now used the GitHub flow to suggest changes, perform a review, and merge those into your codebase.
8787

@@ -98,17 +98,17 @@ The GitHub flow is a workflow for managing changes and incorporating new feature
9898
| [← Add new functionality][walkthrough-previous] | [Next: Deploy the application →][walkthrough-next] |
9999
|:-----------------------------------|------------------------------------------:|
100100
101+
[issues-exercise]: ./2-issues.md
102+
[security-exercise]: ./1-code-scanning.md
103+
[testing-exercise]: ./4-testing.md
104+
[walkthrough-next]: ./8-deployment.md
105+
[walkthrough-previous]: ./6-code.md
106+
101107
[about-branches]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches
102108
[about-prs]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
103109
[cicd-resources]: https://resources.github.com/ci-cd/
104-
[code-exercise]: ./6-code.md
105110
[github-codespaces]: https://github.com/features/codespaces
106111
[github-cli]: https://cli.github.com/
107112
[github-flow]: https://docs.github.com/en/get-started/quickstart/github-flow
108-
[issues-exercise]: ./2-issues.md
109-
[security-exercise]: ./1-code-scanning.md
110-
[skills-review-prs]: https://github.com/skills/review-pull-requests
111113
[skills-release-workflow]: https://github.com/skills/release-based-workflow
112-
[testing-exercise]: ./4-testing.md
113-
[walkthrough-previous]: 6-code.md
114-
[walkthrough-next]: 8-deployment.md
114+
[skills-review-prs]: https://github.com/skills/review-pull-requests

0 commit comments

Comments
 (0)