How to convert a normal Git repository to a bare one?

后端 未结 17 1001
礼貌的吻别
礼貌的吻别 2020-11-22 08:05

How can I convert a \'normal\' Git repository to a bare one?

The main difference seems to be:

  • in the normal Git repository, you have a .git

17条回答
  •  鱼传尺愫
    2020-11-22 08:33

    I think the following link would be helpful

    GitFaq: How do I make existing non-bare repository bare?

    $ mv repo/.git repo.git
    $ git --git-dir=repo.git config core.bare true
    $ rm -rf repo
    

提交回复
热议问题