I want to clone the fresh magento package into my nexcess server. but if I give the command git clone <url>
then it is getting cloned along with the project directory.
I dont want the project directory.I want only the fresh magento package to be cloned into my directory.
please help.
Asked
Active
Viewed 1,388 times
0

Ramya
- 141
- 2
- 12
-
Possible duplicate of [How to get Git to clone into current directory](http://stackoverflow.com/questions/9864728/how-to-get-git-to-clone-into-current-directory) – ChrisGPT was on strike Aug 06 '16 at 16:46
1 Answers
3
git-clone
supports an optional <directory>
argument. Pass .
as this argument, telling git
to clone into the current directory:
git clone <url> .

ChrisGPT was on strike
- 127,765
- 105
- 273
- 257
-
I tried doing this. But it displaying error that the current directory should be empty. – Ramya Aug 08 '16 at 05:25
-
@Ramya, it _shoud_ be empty. Why would you clone a repository into a non-empty directory? It sounds like there are some details that you've left out of your question. Please edit it to add information about what is already in your working directory, and exactly what you want that directory to contain when you're done. – ChrisGPT was on strike Aug 08 '16 at 11:18
-
The directory contains some index.php file and other 2 file. I want to clone fresh magento package into the html folder in nexcess – Ramya Aug 09 '16 at 05:47
-
The command I provided is the correct way to clone into the current directory. But I wouldn't recommend mixing code from different projects in the same directory. If you do, expect to fight against Git instead of working with it. Magento's documentation [gives commands that would clone into a subdirectory](http://devdocs.magento.com/guides/v2.1/install-gde/prereq/dev_install.html#instgde-prereq-compose-clone). – ChrisGPT was on strike Aug 09 '16 at 10:33