Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们的服务器上有 git 1.5.4.3(2008 年 2 月的版本)。看来,当时别无选择--bare。
--bare
那我该如何创建一个裸存储库?
在本地创建它并将其 scp'ing 到服务器将是一种选择,但需要付出太多努力。或者是否可以使用本地git 命令创建新的远程存储库?
使用如此早期版本的 git,您仍然可以使用以下命令创建一个裸存储库:
git --bare init
...而不是更通常的git init --bare。
git init --bare
出于兴趣,我从引入--bare选项的提交的消息中发现了这一点git init:
git init
该提交包含在 git 版本 v1.5.6 及更高版本中。