= Gitリポジトリの作り方 手抜きバージョン = moinmoin-hackというリポジトリを作ろうとしているとする。 nestにbareリポジトリを作成する。 {{{ nest$ umask 0002 nest$ cd /export/mma/repository-git nest$ mkdir moinmoin-hack.git nest$ cd moinmoin-hack.git nest$ git init --bare --shared=group Initialized empty shared Git repository in /export/mma/repository-git/moinmoin-hack.git/ }}} 適当な端末でリポジトリをcloneしてきて、最初のチェンジセットをコミットする。cloneするときに文句を言われるが気にしてはいけない。 何かファイルをコミットしても良いが、とりあえず空のチェンジセットをコミットすることもできる。コミットしたらpushする。 {{{ $ cd ~/dev/ $ git clone ssh://nest.mma.club.uec.ac.jp/export/mma/repository-git/moinmoin-hack.git/ Enter passphrase for key '/home/ytoku/.ssh/id_rsa': Cloning into moinmoin-hack... done. warning: You appear to have cloned an empty repository. $ git commit --allow-empty -m "Create the new repository." [master (root-commit) 79d0d94] Create the new repository. $ git push origin master Enter passphrase for key '/home/ytoku/.ssh/id_rsa': Counting objects: 2, done. Writing objects: 100% (2/2), 190 bytes, done. Total 2 (delta 0), reused 0 (delta 0) To ssh://nest.mma.club.uec.ac.jp/export/mma/repository-git/moinmoin-hack.git/ * [new branch] master -> master }}}