8000 Fix the URL for checking out a PR to FETCH_HEAD · dedurus/github-cheat-sheet@d61d68f · GitHub
[go: up one dir, main page]

Skip to content

Commit d61d68f

Browse files
author
Sam J Sharpe
committed
Fix the URL for checking out a PR to FETCH_HEAD
I'm pretty sure this example if missing `/head` on the end, because when I do this it fails: ``` $ git fetch origin refs/pull/70 fatal: Couldn't find remote ref refs/pull/70 fatal: The remote end hung up unexpectedly ``` Whereas when I do this it works: ``` $ git fetch origin refs/pull/70/head From github.internal:organisation/example-repo * branch refs/pull/70/head -> FETCH_HEAD ```
1 parent a533f84 commit d61d68f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

README.ja.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ $ git stripspace < README.md
568568
特定のプルリクエストを取り込み、一時的に`FETCH_HEAD`として保存すると、素早く差分を確認してマージすることが可能だ:
569569

570570
```bash
571-
$ git fetch origin refs/pull/[PR-Number]
571+
$ git fetch origin refs/pull/[PR-Number]/head
572572
```
573573

574574
参照仕様を使うとすべてのプルリクエストをローカル・ブランチとして取り込むことができる:

README.ko.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ $ git stripspace < README.md
624624
가져오려면 이렇게 합니다.
625625

626626
```bash
627-
$ git fetch origin refs/pull/[PR-Number]
627+
$ git fetch origin refs/pull/[PR-Number]/head
628628
```
629629

630630
모든 풀 리퀘스트 브랜치를 refspec에 의한 로컬 리모트 브랜치로 받을 수도

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ Pull Requests are special branches on the GitHub repository which can be retriev
573573
Retrieve a specific Pull Request and store it temporarily in `FETCH_HEAD` for quickly `diff`ing or `merge`ing:
574574

575575
```bash
576-
$ git fetch origin refs/pull/[PR-Number]
576+
$ git fetch origin refs/pull/[PR-Number]/head
577577
```
578578

579579
Acquire all Pull Request branches as local remote branches by refspec:

README.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ Pull Request是一种GitHub上可以通过以下多种方式在本地被检索
524524
检索某个分支并临时储存在本地的`FETCH_HEAD`中以便快速查看更改(diff)以及合并(merge):
525525

526526
```bash
527-
$ git fetch origin refs/pull/[PR-Number]
527+
$ git fetch origin refs/pull/[PR-Number]/head
528528
```
529529

530530
通过refspec获取所有的Pull Request为本地分支:

0 commit comments

Comments
 (0)
0