Created
June 22, 2015 18:28
-
-
Save alxsimo/f9a8c9f354aa0a6d568c to your computer and use it in GitHub Desktop.
[Git] Clone repository to non-empty folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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