Reputation: 13
I just stated using and learning Git, when using git clone example.repo
it saves it in C:\users\Alexander\example.repo
.
I would like to change the default saving directory to F:\Work Station\Git - Github\
, which is my HDD for All Web developer files, and also the default directory accessed by VS Code\Studio.
How do i change it? And also is it permanent? For all future repo clones?
This post was the reason i decided to post my question. Reading it, i get a feeling its for another tool, i am using git console and git GUI the originals. I want to learn the basics before moving on to a simplified, custom Git GUI
git clone https://github.com/username/example.git c:/other/path/to/repo
This command doesn't do anything at all. Also Pressing Alt+T in the Git also nothing. Options? tools? all i find is add or remove tools.
Upvotes: 0
Views: 10621
Reputation: 13
After a while by mistake i found it.
git clone
I entered the command blank and it showed me the examples and..
git clone "https of the repo" "F:/Work Station/<name>/"
You need to place it inside "", also the last path needs to specify ether to an excising empty folder, or you place your own name of the folder that will be created, and it will contain all the repositories files inside.
I am happy to figure this by luck. Still a lot to learn. Thanks to all.
Upvotes: 1
Reputation: 344
If no path is specified git clone example.repo
will create a new folder in the current directory called "example". If you wish to put the repository elsewhere you may navigate using the change directory command: cd
.
From the info you have given and assuming you are using Git Bash since you tagged your question with it, I would run cd /F/navigate-to-your-desired-location
, then run git clone example.repo
. Please note that Git Bash works similar to Unix and may see your HDD as a directory (folder). Best of luck!
Upvotes: 2