为什么git clone –bare和–origin不兼容?

我确定必须有一个很好的理由,但我不明白为什么我不能在裸回购中设置我的原产地名称. 最佳答案 如
jthil
comments,以及自
git 1.2.0 (January 2006)起实施

clone: do not create remotes/origin nor origin branch in a bare repository.
It is simply pointless, since no merges will ever happen in such a repository.

这并不妨碍您添加远程,如git1.6.0 (August 2008)所示,使用–mirror选项.

The command line git clone --mirror $URL is now a short-hand for:

$git clone --bare $URL
$(cd $(basename $URL) && git remote add --mirror origin $URL)
点赞