when I clone a git repository, for example

git@github.com:mainRepo/index.git 

then I create an index folder where all the files are located.

Question: But if I don’t want the index folder to be created, and the files were cloned simply to the folder where I am, or another specified one, is it possible?

  • git clone url directory - etki
  • thanks, that is necessary - Diefair

1 answer 1

to the folder where i am

 $ git clone url . 

other specified

 $ git clone url другой/каталог 

The specified directory (if already exists) must be empty. otherwise, you get an error:

fatal: destination path. already exists and is not an empty directory.


See the documentation for details on using the git clone command.