Skip to content

Instantly share code, notes, and snippets.

@alxsimo
Created June 22, 2015 18:28
Show Gist options
  • Save alxsimo/f9a8c9f354aa0a6d568c to your computer and use it in GitHub Desktop.
Save alxsimo/f9a8c9f354aa0a6d568c to your computer and use it in GitHub Desktop.
[Git] Clone repository to non-empty folder
/* clones repository to existing folder */
git init
git remote add origin PATH/TO/REPO
git fetch
git checkout -t origin/master
NOTE: -t will set the upstream branch for you, if that is what you want, and it usually is.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment