Git clone into non-empty directory

If you want to clone a git repository into a non-empty directory you will get an error: fatal: destination path ‘.’ already exists and is not an empty directory. You can fix this:

git init
git remote add origin PATH/TO/REPO
git fetch
git checkout -t origin/master
If you get the following error: fatal: Cannot update paths and switch to branch 'master' at the same time:
git remote -v
git fetch origin
git branch -avv
git checkout -t origin/master