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?
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?
2 Answers
Reset to default 1When cloning a repository with the command palette, VS Code clones the repo in the path specified in the setting git.defaultCloneDirectory
(/home/vscode/
might be proposed because set in this config variable). If git.defaultCloneDirectory
is not set, VS Code clones the repository in the user's folder. On Windows, this corresponds to C:\Users\<Your-User>\
.
If you want to specify a path for git.defaultCloneDirectory
, just go to File
> Preferences
> Settings
and then, either search for git.defaultCloneDirectory
, or browse to Extension
> Git
> Default Clone Directory
.
As a side note, if you clone a repository from VS Code bash without supplying a destination directory, the repo is always cloned in the user's folder, even if git.defaultCloneDirectory
is set. git.defaultCloneDirectory
is used only with the command palette.
The directory looks like it's Linux not Windows. Are you running this on WSL or on ssh? If so, then that's where it is stored.
You can do uname -a
to see if you're running WSL.