Cloning git directly into web root public_html

Using github, when I clone a repository it creates a subfolder with the name of the repository.

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

  • How to make dependencies between merged patch and before merged patch in gerrit?
  • Is it possible to add patch sets to a Gerrit review without ammending/squashing commits
  • error: object file is empty .git/objects/../.. is empty — fatal: loose object … is corrupt
  • Git branches not merged after switching from svn
  • How to properly organize repository with big files which are rarely or never changed?
  • Cherry-pick commits to a particular folder of git repo from other repo
  • git clone

    …then there is a folder public_html/myrepo/

    How do I approach cloning it directly into the root of public_html without the subfolder being created?

    Moreover, is this the best approach for deploying, or should I be creating a symlink, for example?

  • Mercurial/Git: Different directories for different branches in same repository
  • Repo specific ignore files in git
  • git gui branch management
  • How to push to github from netbeans without local branch
  • Using TeamCity with BitBucket
  • Syncing magento database froms development to production
  • 2 Solutions collect form web for “Cloning git directly into web root public_html”

    git clone .

    See this question for more details.

    Clone into cwd:

    git clone .
    Git Baby is a git and github fan, let's start git clone.