pullしてpush
自信はないけど、たしかこんな感じでやったはず…
git clone git://github.com/yoko/userscripts.git cd userscript git fetch myfork git remote add myfork git@github.com:iwadon/userscripts.git git checkout -b myfork myfork/master git pull origin master git push myfork master
そろそろpull requestを送ってみようかな。
2010-10-09追記: 3行目にgit fetch myfork
を追加。これを行わないと次の行のgit remote
はエラーになる。参考:Git checkout: updating paths is incompatible with switching branches - Stack Overflow
2010-10-10追記: どうしても最後のgit push myfork master
でエラーになってしまった。
% git status # On branch myfork # Your branch is ahead of 'myfork/master' by 420 commits. # nothing to commit (working directory clean) % git pull myfork master Already up-to-date. % git push myfork master To git@github.com:iwadon/homebrew.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@github.com:iwadon/homebrew.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (e.g. 'git pull') before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details.
色々試したが、最終的にgit push myfork HEAD:master
とすることでgit push
が完了した。正直まだ原因や理由を理解しておらず、魔法をかけられたような感じ。後日必要に応じて調べることにする。