Git Clone default directory on Windows 7

I wanted to clone github directory from web locally on Windows 7. So I used following command -

git clone git://github address

I was expecting that it will get downloaded under current directory, which was c:/windows/system32 .

The output of the command is as follows -

C:WINDOWSsystem32>git clone https://github.com/Hvass-Labs/TensorFlow-Tutorials
.git
Cloning into 'TensorFlow-Tutorials'...
remote: Counting objects: 338, done.
rRemote: Total 338 (delta 0), reused 0 (delta 0), pack-reused 338eceiving object
Resolving deltas:   0% (0/158)
Resolving deltas: 100% (158/158), done.
Checking connectivity... done.
Checking out files: 100% (96/96), done.

But the cloned directory is nowhere in the path. Absolutely nowhere in the system. I tried current directory, entire C drive and entire D drive. But no luck. The repository was huge so I don't want to try cloning again. :(

Can someone please tell me under which directory Git clone downloads the github directory on Windows 7?


By default, git clone in a subdirectory of the current folder and that has the name of the repository cloned.

Here it should be C:WINDOWSsystem32TensorFlow-Tutorials .

If you want to clone inside the current directory, you should add a '.' to indicate that you want to clone in the current folder.

But the folder should be empty.

And also, it's a very bad practice that cloning in a Windows system folder than you try to do... Prefer cloning in your personal folder and add the folder in the PATH if needed...


Finally it worked with following command.

D:>git clone https://github.com/Hvass-Labs/TensorFlow-Tutorials d:tensorflow Cloning into 'd:tensorflow'... remote: Counting objects: 338, done. remote: Total 338 (delta 0), reused 0 (delta 0), pack-reused 338 Receiving objects: 100% (338/338), 55.66 MiB | 1.10 MiB/s, done. Resolving deltas: 100% (158/158), done. Checking connectivity... done. Checking out files: 100% (96/96), done.

So it seems it was lacking permissions in system32 folder. But then it should have thrown the error.

链接地址: http://www.djcxy.com/p/90502.html

上一篇: 将Git仓库导入Aptana项目子

下一篇: Git Clone在Windows 7上的默认目录