CodeReposとgithubを併用する
CodeReposをありがたく使わせてもらっているけど、githubにも同じコードを置きたい、ということがよくありますよね。あるんです。以下はそのときのためのメモ。
プロジェクトを始めるとき
- CodeReposにファイルやディレクトリ一式 (X) をつくってcommit
- githubにレポジトリをつくる。(自分用のclone URL を Yとする)
- git svn clone で CodeReposにつくった一式 (X) をcheckout
- checkoutしたディレクトリで、git remote add github Y
- git remote push github
この手順でやればOK。 先にCodeReposでcommitしておいてからgit svnでcheckoutというところがミソなのかなと。
例
refe2-vim というプロジェクトをはじめることを考えます。
- mkdir $CODEREPOS/lang/vim/refe2-vim (X)
- create new github repository → http://github.com/mootoh/refe2-vim/ (Y: git@github.com:mootoh/refe2-vim.git)
- git svn clone http://svn.coderepos.org/share/lang/vim/refe2-vim
- cd refe2-vim
- git remote push github
だいたいこんなかんじ。
日々commitするとき
- ローカルに commit
- CodeReposにcommit (git svn dcommit)
- github にpush (git remote push github)
でOK。
ToDo: Mercurialも混ぜてみる
Comments:2
- kana 08-06-15 (Sun) 17:16
-
git-svn cloneしたリポジトリをベースにしなくても同じことはできたと思います。
- mootoh 08-06-15 (Sun) 17:21
-
kanaさん:
コメントありがとうございます。調べっぷりが足りてませんで…
Trackbacks:0
- Trackback URL for this entry
- http://blog.deadbeaf.org/2008/06/15/coderepos-with-github/trackback/
- Listed below are links to weblogs that reference
- CodeReposとgithubを併用する from mootoh.log

