Git: Clone to an alternate directory name
See original GitHub issueWhen performing a git clone
I’d like the option to specify an alternate target directory, just as I can with git clone
on the command line.
For example, this can be useful when cloning a template repository, making a few edits, then pushing back to a new origin.
The problem as it stands is that the location chosen within VSCode is only for the repository’s parent directory. There does not appear to be a way to specify the destination proper.
To illustrate further, VSCode appears to do the equivalent of:
$ mkdir -p /home/jdandrea/git/my-repo && cd $_
$ git clone https://url/to/repo.git
Cloning into 'repo'...
. . .
Whereas what I want to do instead is:
$ git clone https://url/to/repo.git /home/jdandrea/git/my-repo
Cloning into '/home/jdandrea/git/my-repo'...
. . .
Note the different clone target of my-repo
vs repo
.
I tried renaming the directory just after cloning, expecting VSCode to follow the name change, however this does not work as expected and is out-of-scope per #20071.
_Originally posted by @jdandrea in https://github.com/microsoft/vscode/issues/103987#issuecomment-674966458_
Issue Analytics
- State:
- Created 3 years ago
- Reactions:39
- Comments:15 (2 by maintainers)
Top GitHub Comments
Why does VSCode ask for a directory then creates another directory inside of it that matches the repo name? I would to disable that behavior: use the directory I just gave you without adding another folder.
Oh you want a different folder name.