git clone into home directory git clone into home directory linux linux

git clone into home directory


This seems to work:

cd ~git initgit remote add origin ssh://host/repo.gitgit pull origin master


The clone command creates a new directory when you pass a second argument:

$ git clone ssh://host/repo.git ~/your_directory

clone will create ~/your_directory. If the directory already exists it will give you the error you get.


cd ~git clone ssh://host/repo.git

After that, you have the project in the /home/username/repo/ directory

If you want to have the project in a different folder name (e.g 'foo/')

mkdir ~/foocd ~/foogit clone ssh://host/repo.git foo/