2016-08-16 121 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