How to shallow clone a local git repository with a relative path?

前端 未结 3 941

Shallow clones of local directories require file:// as explained at: git clone: warning: --depth is ignored in local clones; use file:// instead

But how

3条回答
  •  一生所求
    2020-12-16 21:10

    But how to use relative paths with that?

    This is not supported; file:// expects only absolute paths. There are e.g. RFC1738 and RFC8089 which describe this kind of URIs.

    A file URL takes the form:

       file:///
    

    where is the fully qualified domain name of the system on
    which the is accessible, and is a hierarchical
    directory path of the form //.../.

    When you write file://mymodule, the mymodule can be interpreted as a hostname.

提交回复
热议问题