Skip to content

Instantly share code, notes, and snippets.

@ponkore
Created August 3, 2012 05:19
Show Gist options
  • Save ponkore/3244618 to your computer and use it in GitHub Desktop.
Save ponkore/3244618 to your computer and use it in GitHub Desktop.
github上でgithubにフォークしたリモートリポジトリを本家リモートリポジトリに追随する
# http://d.hatena.ne.jp/haru-s/20110405/1302006637 に答えがそのままあるが、一応メモ
# github fork 追従 で見つけた
$ git remote
origin
# 本家のリモートリポジトリの短縮名を登録する.
$ git remote add github git://github.com/liquidz/misaki.git
# 本家の更新をローカルで反映させる.
$ git pull --rebase github master
remote: Counting objects: 146, done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 113 (delta 71), reused 88 (delta 46)
Receiving objects: 100% (113/113), 14.46 KiB, done.
Resolving deltas: 100% (71/71), completed with 17 local objects.
From git://github.com/liquidz/misaki
* branch master -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Fast-forwarded master to a99c960c356b866db59808252391cadce3d3b44b.
# フォークしたリモートリポジトリをpullしてからpushして本家に追随させる.(1)
$ git pull origin master
From https://github.com/ponkore/misaki
* branch master -> FETCH_HEAD
Already up-to-date.
# フォークしたリモートリポジトリをpullしてからpushして本家に追随させる.(2)
$ git push origin master
Username:
Password:
Counting objects: 146, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (24/24), done.
Writing objects: 100% (113/113), 14.46 KiB, done.
Total 113 (delta 71), reused 113 (delta 71)
To https://github.com/ponkore/misaki.git
a5d9ba1..a99c960 master -> master
$
# 完了!!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment