I used this to clone a repo to the current directory, which wasn't empty. Not necessarily clean living, but it was in a disposable docker container:
git clone https://github.com/myself/myRepo.git temp
cp -r temp/* .
rm -rf temp
Here, I used cp -r
instead of mv
, since that copies hidden files and directories. Then dispose of the temporary directory with rm -rf