LoginSignup
228

More than 5 years have passed since last update.

GitHubでフォーク元の差分を取り込む

Last updated at Posted at 2012-12-26

GitHubでフォークした後にフォーク元の差分を取り込む時の手順です。

ローカル環境で該当プロジェクトのディレクトリに移行して、フォーク元のリポジトリを登録します。

$ git remote add upstream git://github.com/octocat/Spoon-Knife.git

git://github.com/octocat/Spoon-Knife.gitはフォーク元のURLになります。

フォーク元からの内容を取得して、自分のmasterにマージします。

$ git fetch upstream
$ git merge upstream/master

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
228