gitvisual-studio-codegit-clone

Where is VS Code cloning a git repository?


I ran the git:clone command in VS Code command palette to clone a repository from GitHub. Where is the repo getting cloned to? VS Code is running locally on my laptop. I am on a Windows machine. Why am I seeing /home/vscode/ path as a destination on Windows?

VS Code shows /home/vscode/ as destination path

the context of the question is that I am trying to set an environment for python. I was not able to do so as I saw projects path as /home/vscode whereas my python library was in c:\....\.. I had to download the code as zip (instead of using git clone and extract is locally to make the code work.


Solution

  • You can do explorer.exe . in your terminal to see the absolute path of the folder you are currently in. It should be something like C:\<some more stuff here>.

    If you want to clone the repository elsewhere, then make sure Powershell is open in your Terminal, cd into the folder you want it to be in and git clone it there. As an example:

    cd C:\Users\<your windows username>\Documents\;
    git clone https://github.com/Azure-Samples/cognitive-services-speech-sdk.git;
    

    If the first line doesn't work then that means you're in a linux terminal for which you can do:

    cd /C/Users/<your windows username>/Documents;
    git clone https://github.com/Azure-Samples/cognitive-services-speech-sdk.git;