Reputation: 67502
I have an existing repository on BitBucket, and am cloning it locally using SmartGit 3 on Windows 7 (x64). I have a folder, let's say C:/FolderA/FolderB
that I want to place it in. (So that readme.txt
becomes C:/FolderA/FolderB/readme.txt
.)
However, when I clone the repository, and set the Path to C:/FolderA/FolderB
, it creates readme.txt
in C:/FolderA/FolderB/repository-name/readme.txt
. How can I prevent this?
If there is no way to do this with SmartGit, how can I achieve it from the Git command line?
NB: Google had nothing to say on this, either... [1] [2] [3] etc...
Upvotes: 1
Views: 7736
Reputation: 116197
You can use
git clone <git-url> [target-dir]
If you do not specify target dir, it will by default create new directory named after repo name (and this is what you are seeing).
You can always rename your target dir or move it around as you wish (one level up for example) - git does not really care, as long as .git
sub-dir is intact.
Upvotes: 3