git clone into home directory

rich picture rich · Feb 25, 2012 · Viewed 28.9k times · Source
$ git clone ssh://host/repo.git ~/
destination directory '/home/username/' already exists.

Can anyone tell me how to make this work? I'm trying to quickly be able to replicate common dev scripts and config.

Answer

rich picture rich · Feb 25, 2012

This seems to work:

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