1

I have a git repository in a remote repository named site.git. I want to create a local repository in a subdirectory site/www/. When I simply clone the repository to the www directory, I get site/www/site.

How can I set up my local repository without the extra directory?

James Newton
  • 6,203
  • 7
  • 44
  • 97

2 Answers2

3
cd site/www
git clone site.git .
Armand
  • 22,275
  • 20
  • 85
  • 117
3

A similar question has already been asked and there is the perfect answer:

How do you clone a git repository into a specific folder?


I will give the simplest solution. Use the command:

git clone <repository> [<directory>]

Link to documentation: git-clone

Community
  • 1
  • 1
Victor Dombrovsky
  • 2,525
  • 2
  • 17
  • 31