2020年3月4日 星期三

[github] Checking out pull requests locally on GitHub 如何 fetch 別人的 PR (pull requests)


Checking out pull requests locally on GitHub

如果不是push到同一個remote
怎麼 fetch 別人 forks 後的 pull requests 呢?

在 GitHub 上非常的方便。

git fetch origin pull/{ID}/head:BRANCHNAME
git checkout BRANCHNAME

Ex
git fetch origin pull/81/head:BRANCHNAME
git checkout BRANCHNAME



Checking out pull requests locally - GitHub Help https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally#modifying-an-inactive-pull-request-locally

沒有留言:

張貼留言