To commit to a pull request branch created from a fork, you need push access to the base repository, permission from the pull request creator, and a user-owned fork without branch restrictions that prevent your push. Only the pull request creator can allow edits to their fork. See Allowing changes to a pull request branch created from a fork.
-
On GitHub, navigate to the fork where the pull request branch was created.
-
ファイル一覧の上にある [ Code] をクリックします。
![リポジトリのランディング ページのファイル リストのスクリーンショット。 [コード] ボタンが濃いオレンジ色の枠線で囲まれています。](/assets/cb-13128/images/help/repository/code-button.png)
-
リポジトリの URL をコピーします。
-
HTTPS を使用してリポジトリを複製するには、"HTTPS" の下にある をクリックします。
-
Organization の SSH 認証機関から発行された証明書などの SSH キーを使ってリポジトリをクローンするには、 [SSH] 、 の順にクリックします。
-
GitHub CLI を使ってリポジトリをクローンするには、 [GitHub CLI] をクリックしてから、 をクリックします。
![[コード] ドロップダウン メニューのスクリーンショット。 リポジトリの HTTPS URL の右側に、コピー アイコンが濃いオレンジ色の枠線で囲まれています。](/assets/cb-60499/images/help/repository/https-url-clone-cli.png)
-
-
Open your terminal or Git Bash.
-
Change the current working directory to the location where you want to clone the fork.
cd open-source-projects -
Clone the fork, then navigate into the cloned repository.
git clone https://github.com/USERNAME/FORK-OF-THE-REPOSITORY cd FORK-OF-THE-REPOSITORY -
Check out the pull request's compare branch. To find the compare branch, open the pull request and check the branch shown at the top of the page.
git checkout TEST-BRANCH -
Make your changes, then stage and commit them.
git add . git commit -m "YOUR-COMMIT-MESSAGE" -
Push your commit to the pull request branch.
git push origin TEST-BRANCH
Your new commits appear on the original pull request on GitHub.com.