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?
I’d like to git clone the contents of a repository I have on GitHub
Share
If the current directory is empty, you can do that with:
(Note the
.at the end to specify the current directory.) Of course, this also creates the.gitdirectory in your current folder, not just the source code from your project.This optional
[directory]parameter is documented in thegit clonemanual page, which points out that cloning into an existing directory is only allowed if that directory is empty.