$ 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.
The fastest way to change the folder name when cloning a GitHub repository is to simply specify the name you want at the end of the git clone command. Here's a short video showing the entire process: When you're done downloading the repo do cd your-app-name to enter your directory with all the Create React App files.
From git help clone : Cloning into an existing directory is only allowed if the directory is empty. So make sure the directory is empty (check with ls -a ), otherwise the command will fail.
This seems to work:
cd ~
git init
git remote add origin ssh://host/repo.git
git 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With