0 votes
1 view
in Devops and Agile by (28.1k points)

I'd like to git clone the contents of a repository I have on GitHub. When I git clone ([email protected]:me/name.git...) I get a folder called name/ and inside name I have my contents... How do I get JUST the contents?

2 Answers

0 votes
by (220 points)
git clone <repository> .
0 votes
by (48k points)

If the current directory is empty, you can do that with:

git clone [email protected]:me/name.git .

(Note: '.' at the end is used to specify the current directory.)  this also creates the .git directory in your current folder.

From documentation:

“It points out that cloning into an existing directory is only allowed if that directory is empty.”

Welcome to Intellipaat Community. Get your technical queries answered by top developers !