2016-08-16 67 views
2

假设我在本地计算机上有一个裸存储库,其编号为./new-bare.git。 将我的计算机克隆到其他位置的正确方法是什么?如何从*本地裸*库中克隆克隆

+0

[从其他目录的git克隆](的可能的复制http://stackoverflow.com/questions/21045061/git- clone-from-another-directory) – frlan

+0

@frlan不同的问题 - 我指的是从裸仓库克隆,如头文件强调 –

+0

裸露/非裸露应该没有任何区别 – frlan

回答

5

有来自未纯仓库在克隆无差异:

/tmp> mkdir foo 
/tmp> git init --bare foo 
Initialized empty Git repository in /tmp/foo/ 
/tmp> git clone /tmp/foo /tmp/baa 
Cloning into '/tmp/baa'... 
warning: You appear to have cloned an empty repository. 
done. 
+0

我是有点困惑与使用'--local',但我想你的答案适用于我的简单情况。 10X –

4
git clone path_to_new-bare.git new_destination