0

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:\WINDOWS\system32>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?

melpomene
  • 84,125
  • 8
  • 85
  • 148
Pallavi
  • 548
  • 2
  • 9
  • 18
  • 3
    I don't think you actually cloned anything, q.v. [here](https://stackoverflow.com/questions/651038/how-do-you-clone-a-git-repository-into-a-specific-folder). Please check the syntax for `git clone`. By the way, the default behavior of `git clone` is to clone into the directory from which you issue the command. – Tim Biegeleisen Dec 10 '17 at 13:58
  • I have edited my question. This is my output. The command was successful. – Pallavi Dec 10 '17 at 14:01
  • 2
    That output indicates it created `C:\WINDOWS\system32\TensorFlow-Tutorials`. – melpomene Dec 10 '17 at 14:06
  • but its not there :( – Pallavi Dec 10 '17 at 15:29
  • 1
    Aside: Why would you put this in `C:\WINDOWS\system32`? Seems like a strange, and possibly unsafe, place to put sample code. – ChrisGPT was on strike Dec 10 '17 at 16:59
  • I know the folder was wrong. But that was just till the completion of command. I was supposed to keep it in my D drive folder after downloading. – Pallavi Dec 11 '17 at 03:52

2 Answers2

1

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:\WINDOWS\system32\TensorFlow-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...

Philippe
  • 28,207
  • 6
  • 54
  • 78
  • Its not there in the above directory. – Pallavi Dec 10 '17 at 15:30
  • I know its a bad practice but I generally fire the same command in Ubuntu and it works. I then copy it to my preferred location. So wanted to do the same here. But not able to find it in that location. God knows where it has gone! – Pallavi Dec 10 '17 at 15:33
1

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.

Pallavi
  • 548
  • 2
  • 9
  • 18