前に作った手順より、こっちのほうが良いみたいです。
新しく公開用のリポジトリを作る
$ cd /tmp $ mkdir Sample.git $ cd Sample.git $ git init --bare --shared=true Initialized empty shared Git repository in /tmp/Sample.git/ $
公開用リポジトリにpushする
初期設定
$ cd Sample $ git remote add origin ssh://git.local/tmp/Sample.git $
push
$ git push origin master Counting objects: 130, done. Delta compression using up to 2 threads. Compressing objects: 100% (120/120), done. Writing objects: 100% (130/130), 37.10 KiB, done. Total 130 (delta 54), reused 0 (delta 0) * [new branch] master -> master $
公開用リポジトリからのpull
$ git clone ssh://git.local/tmp/git/Sample.git remote: Counting objects: 130, done. remote: Compressing objects: 100% (66/66), done. remote: Total 130 (delta 54), reused 130 (delta 54) Receiving objects: 100% (130/130), 37.10 KiB, done. Resolving deltas: 100% (54/54), done. $