{"meta":{"title":"フォーク用のリモート リポジトリの構成","intro":"フォークと元のリポジトリの間の変更を同期するために、Git のアップストリーム リポジトリを指すリモート を設定します。","product":"Pull Request","breadcrumbs":[{"href":"/ja/pull-requests","title":"Pull Request"},{"href":"/ja/pull-requests/how-tos","title":"使い方"},{"href":"/ja/pull-requests/how-tos/work-with-forks","title":"フォークを操作する"},{"href":"/ja/pull-requests/how-tos/work-with-forks/configuring-a-remote-repository-for-a-fork","title":"リモート リポジトリを構成する"}],"documentType":"article"},"body":"# フォーク用のリモート リポジトリの構成\n\nフォークと元のリポジトリの間の変更を同期するために、Git のアップストリーム リポジトリを指すリモート を設定します。\n\n1. ターミナルまたは Git Bash を開きます。\n1. フォーク用に現在構成されているリモートを一覧表示します。\n\n   ```shell\n   $ git remote -v\n   > origin  https://github.com/YOUR-USERNAME/YOUR-FORK.git (fetch)\n   > origin  https://github.com/YOUR-USERNAME/YOUR-FORK.git (push)\n   ```\n\n1. 元のリポジトリを指す _アップストリーム_ という名前の新しいリモートを追加します。\n\n   ```shell\n   git remote add upstream https://github.com/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git\n   ```\n\n1. フォークに指定した新しいアップストリーム リポジトリを確認します。\n\n   ```shell\n   $ git remote -v\n   > origin    https://github.com/YOUR-USERNAME/YOUR-FORK.git (fetch)\n   > origin    https://github.com/YOUR-USERNAME/YOUR-FORK.git (push)\n   > upstream  https://github.com/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git (fetch)\n   > upstream  https://github.com/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git (push)\n   ```"}