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

后端 未结 17 1204
礼貌的吻别
礼貌的吻别 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:10

    Unless you specifically want or need to twiddle bits on the filesystem, it really is dead simple to create a bare version of a non-bare repository (mentioned in several other posts here). It’s part of git’s core functionality:

    git clone --bare existing_repo_path bare_repo_path

提交回复
热议问题