»
S
I
D
E
B
A
R
«
CodeReposとgithubを併用する
June 15th, 2008 by mootoh

CodeReposをありがたく使わせてもらっているけど、githubにも同じコードを置きたい、ということがよくありますよね。あるんです。以下はそのときのためのメモ。

プロジェクトを始めるとき

  1. CodeReposにファイルやディレクトリ一式 (X) をつくってcommit
  2. githubにレポジトリをつくる。(自分用のclone URL を Yとする)
  3. git svn clone で CodeReposにつくった一式 (X) をcheckout
  4. checkoutしたディレクトリで、git remote add github Y
  5. git remote push github

この手順でやればOK。 先にCodeReposでcommitしておいてからgit svnでcheckoutというところがミソなのかなと。

refe2-vim というプロジェクトをはじめることを考えます。

  1. mkdir $CODEREPOS/lang/vim/refe2-vim (X)
  2. create new github repository → http://github.com/mootoh/refe2-vim/ (Y: git@github.com:mootoh/refe2-vim.git)
  3. git svn clone http://svn.coderepos.org/share/lang/vim/refe2-vim
  4. cd refe2-vim
  5. git remote push github

だいたいこんなかんじ。

日々commitするとき

  • ローカルに commit
  • CodeReposにcommit (git svn dcommit)
  • github にpush (git remote push github)

でOK。


ToDo: Mercurialも混ぜてみる


2 Responses  
kana writes:
June 15th, 2008 at 5:16 pm

git-svn cloneしたリポジトリをベースにしなくても同じことはできたと思います。

mootoh writes:
June 15th, 2008 at 5:21 pm

kanaさん:

コメントありがとうございます。調べっぷりが足りてませんで…

Leave a Reply

»  Substance: WordPress   »  Style: Ahren Ahimsa