Skip to content

Commit 925cdc1

Browse files
authored
Enhance instructions for checking out pull requests locally
Clarify instructions for fetching a pull request reference and creating a local branch.
1 parent af20860 commit 925cdc1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,15 @@ Anyone can work with a previously opened pull request to continue working on it,
6565
![Screenshot of the title of a pull request. The pull request's ID number is outlined in dark orange.](/assets/images/help/pull_requests/pull-request-id-number.png)
6666

6767
{% data reusables.command_line.open_the_multi_os_terminal %}
68-
1. Fetch the reference to the pull request based on its ID number, creating a new branch in the process.
68+
1. Fetch the reference to the pull request based on its ID number, creating a new branch in the process. Use the pull request ID and the name of the local branch you want to create in the command.
6969

7070
```shell
7171
git fetch origin pull/ID/head:BRANCH_NAME
7272
```
73+
For pull request #123, creating a local branch named `test_branch`, this would become:
74+
```shell
75+
git fetch origin pull/123/head:test_branch
76+
```
7377

7478
1. Switch to the new branch that's based on this pull request:
7579

0 commit comments

Comments
 (0)