git从另一个目录克隆 [英] git clone from another directory
问题描述
假设我在 C:/ folder1 $ c $中有一个回购c>和
C:/ folder2
我想克隆 folder1
转换为 folder2
。
我会在命令提示符中输入什么内容?
似乎通常在提供克隆URL而不是文件路径时,现在我只是在练习并尝试使用Git。 p>
cd / dc:\
git clone C:\folder1 folder2
从 git clone
的文档:
< blockquote>
对于本地支持的本地存储库,可以使用以下语法:
/path/to/repo.git/
file:///path/to/repo.git/
这两个语法大部分都是等价的,除了前者意味着--local选项。
I am trying to clone repo from another directory.
Lets say I have one repo in C:/folder1
and C:/folder2
I want to clone the work in folder1
into folder2
.
What would I type into the command prompt to do this?
It seems that often when cloning a URL is provided rather then a file path, however, at this moment I am just practicing and trying to get use to Git.
cd /d c:\
git clone C:\folder1 folder2
From the documentation for git clone
:
For local repositories, also supported by git natively, the following syntaxes may be used:
/path/to/repo.git/ file:///path/to/repo.git/
These two syntaxes are mostly equivalent, except the former implies --local option.
这篇关于git从另一个目录克隆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!