Last active
August 29, 2015 13:58
-
-
Save adrianwebb/10426167 to your computer and use it in GitHub Desktop.
Git existing repo initialization
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
# Source: http://stackoverflow.com/questions/5377960/whats-the-best-practice-to-git-clone-into-an-existing-folder | |
git init | |
git remote add origin $repo_url | |
git fetch origin | |
git checkout -b $branch --track origin/$branch | |
git reset origin/$branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment