3
據git help clone
的--local
選項的輸出執行以下操作:當使用git clone [path]時,--local實際上是否做了任何事情?
--local, -l
When the repository to clone from is on a local machine, this flag bypasses the normal "Git
aware" transport mechanism and clones the repository by making a copy of HEAD and everything
under objects and refs directories. The files under .git/objects/ directory are hardlinked to
save space when possible.
If the repository is specified as a local path (e.g., /path/to/repo), this is the default, and
--local is essentially a no-op. If the repository is specified as a URL, then this flag is
ignored (and we never use the local optimizations). Specifying --no-local will override the
default when /path/to/repo is given, using the regular Git transport instead.
如果我正確地讀這篇文章,第二段說,此選項將默認爲上每當本地路徑,並給出了將只要給定的路徑不是本地的,就被忽略。那麼有什麼意義呢?它怎麼會有影響?當它做了一些事情時,它是否與舊版本的git兼容,基本上是沒有操作的存根?
我知道「 - 本地」克隆回購和「 - 無本地」回報之間的一種不同效應。使用「 - local」它克隆搖擺的對象,但是「--no-local」它不會。 – ElpieKay