Skip to content

Instantly share code, notes, and snippets.

@ScottJWalter
Forked from damondouglas/gitclone-nonempty.sh
Created March 20, 2019 23:30
Show Gist options
  • Save ScottJWalter/4a015227e837d984bb5a2a35346c2d4d to your computer and use it in GitHub Desktop.
Save ScottJWalter/4a015227e837d984bb5a2a35346c2d4d to your computer and use it in GitHub Desktop.
Git clone into non-empty directory
git clone --no-checkout [email protected]:<path>.git tmp
mv tmp/.git .
rm -rf tmp
git reset --hard HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment