forkしたリポジトリを更新する[Git]

qiita.com

よく忘れるので,こちらを参考にメモ.

// fork
$ git clone https://github.com/(自分のユーザ名)/(フォークしたいリポジトリ.git)

// cloneしたフォルダに移動して,検索でcmdと入力してコマンドプロンプトを起動
// fork元を取得
$ git remote add root_branch https://github.com/(Fork元のユーザ名)/(フォークしたいリポジトリ.git)

// 登録された確認
$ git remote -v

// diffを取ってmerge
$ git fetch root_branch
$ git merge root_branch/master
$ git push origin master