克隆GitHub仓库的内容(不包含文件夹本身) [英] Clone contents of a GitHub repository (without the folder itself)
问题描述
我希望 git clone
存储库中的内容 GitHub的的。当我 git clone
(git @ github:me / name.git ...)时,我得到一个名为 name /
和内部名称我有我的内容...如何获得只是内容?
如果当前目录为空,你可以这样做:
git clone git @ github:me / name.git。
(请注意 .git
目录,而不仅仅是项目的源代码。
这个可选的 [目录]
参数记录在 git clone
手册页,它指出只有当该目录为空时才允许克隆到现有目录。 p>
I'd like to git clone
the contents of a repository I have on GitHub. When I git clone
(git@github:me/name.git...) I get a folder called name/
and inside name I have my contents... How do I get JUST the contents?
If the current directory is empty, you can do that with:
git clone git@github:me/name.git .
(Note the .
at the end to specify the current directory.) Of course, this also creates the .git
directory in your current folder, not just the source code from your project.
This optional [directory]
parameter is documented in the git clone
manual page, which points out that cloning into an existing directory is only allowed if that directory is empty.
这篇关于克隆GitHub仓库的内容(不包含文件夹本身)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!