把普通的git库变成bare库

$ cd your_repo
$ mv .git .. && rm -fr *
$ mv ../.git .
$ mv .git/* .
$ rmdir .git

$ git config --bool core.bare true
$ cd ..; mv your_repo your_repo.git                # 更名

 

创建裸仓库:
$ git init --bare

仓库于裸仓库之间的转换:

$ git clone --bare

 

posted @ 2015-02-18 08:21  微信公众号--共鸣圈  阅读(1669)  评论(0编辑  收藏  举报