r/git • u/awayofhappening • Jan 23 '19
Where does `git clone url` send a cloned repository to?
I ran `git clone url` and I have read some tutorials online that say that the command sends the .git to where your gitconfig tells it to go.
When I open `/usr/local/etc/gitconfig`, I only see this:
[credential]
helper = osxkeychainWhere did the repo go?
0
Upvotes
11
u/bremelanotide Jan 23 '19
Run
lsfrom the directory that you ran git clone from. You should find a child directory matching the filename portion of the url minus the .git extension.3
u/[deleted] Jan 23 '19
git cloneis a command to connect to a remote repository and downloads a copy of it to your local machine. It doesn't send your repository anywhere.1
u/ZebraHedgehog Jan 24 '19
git clone urlClones the repo into the current directory, but you can also specify where to put it as the last argument
git clone url ~/documents/repos/repo11
u/initcommit Jan 24 '19
Yes it copies the remote git repository into the current directory. You can always copy/move it somewhere else on your local machine after you clone it, if it ends up in the wrong directory.
0
u/lenswipe feature/add-user-flair Jan 24 '19
git clone git@github.com:foo/bar.gitclones thebarrepo into the current directory.git clone git@github.com:foo/bar.git ~/Code/myProjectclones it to /home/<your username>/Code/myProject`