git clone without project folder git clone without project folder git git

git clone without project folder


git clone accepts a last argument that is the destination directory, it is by default the name of the project but you can change it. In your case you probably want simply .:

$ git clone origin-url .

But note that, from man git-clone:

Cloning into an existing directory is only allowed if the directory is empty.


You can also just setup a new repo and then the tracking remote and branch:

git init .git remote add origin git@github.com:user/repo.gitgit fetch origingit checkout master


This is working well on Windows also.

git initgit remote add origin git@github.com:user/repo.gitgit pull origin master