Humanity

Edit the world by your favorite way

git clone --mirror

でbareなリポジトリができて、さらに

$ git fetch --all

だけでbareリポジトリのアップデートができる。
bareリポジトリからアップデートしたい時に便利。

別のやり方

--mirrorは実際これと同じことをしてるっぽい(たぶん)

$ git clone --bare {uri}
$ cd {dir}
$ git config remote.origin.fetch '+refs/*:refs/*'
$ git config remote.origin.url $uri
$ git config remote.origin.mirror true