Cloning git directly to the web root public_html

Using github, when I clone a repository, it creates a subfolder named repository.

For example, if I execute the following command in my web root:

git clone git@github.com :exampl/myrepo.git 

... then there is a folder public_html/myrepo/

How to approach cloning directly to the root of public_html without creating a subfolder?

Also, is this the best approach for deployment, or should I create a symlink, for example?

+7
source share
2 answers
 git clone git@github.com :foo/bar . 

See this for more details.

+11
source

Clone in cwd:

 git clone git@github.com :example/myrepo.git . 
+5
source

All Articles