git&dropbox

gitとdropboxでソース管理を行う設定を行ったのでメモ
macでやってます。win&linuxも基本同じです。

gitをインストール

sudo port install git-core

まずはローカルリポジトリの設定を行う

cd ~/Documents/workspace.git
git init
git add .
git commit -m 'Initial commit!!!!'


続いてリモートリボジトリ。こちらはdropbox上におきました。

cd ~/Dropbox/
mkdir workspace.git
cd workspace.git
git --bare init

そしてローカルリポジトリに戻ってpush
最後にリモートのリポジトリを登録しておき
以後はgit pull&git pushで。

cd ~/Documents/workspace.git
git push ~/Dropbox/workspace.git master
git remote add origin ~/Dropbox/workspace.git

dropboxの共有設定を使えば複数人でも美味しい開発ができます。