Search code examples
linuxgithome-directory

git clone into home directory


$ 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.


Solution

  • This seems to work:

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