[git] dreamhostにgitを導入する
ここに書いてる方法を実行したらすんなりとできた。
以下は導入記録
まず始めにdreamhostにsshでログインする。そして、gitのレポジトリフォルダを作成し、初期化する。
ちなみにusername, yourhost.comはdreamhostにログインする際のアカウント及び、URLを意味しています
ssh username@yourhost.com mkdir -p ~/git/project.git cd ~/git/project.git git --bare init
次にローカルでgit initを行い、その情報をdreamhost側のレポジトリに反映させる
mkdir yourproject cd yourproject git init git remote add origin ssh://username@yourhost.com/~/git/project.git touch test git add . git commit -m "Initial Commit" git push origin master
ここまで問題なく実行できたら、git cloneがssh経由で出来るようになっているはずなので、適当なフォルダで試す。
git clone ssh://username@yourhost.com/~/git/project.git
最後にローカル側の.git/configに以下の設定を行いひとまず終了
[branch "master"] remote = origin merge = refs/heads/master
これによりssh経由でdreamhostとローカル間でgitを行うための最低限の設定が終了します。
ちなみにgitはdreamhostにはいっているデフォルトのgitで問題なく実行できました。
後は、http経由でのアクセス及び、gitwebの設定などをおこないたいところですね。