Skip to content

Instantly share code, notes, and snippets.

@glebovdev
Created August 30, 2018 18:40
Show Gist options
  • Save glebovdev/556c7655a85726cb015e91dcd64aafb7 to your computer and use it in GitHub Desktop.
Save glebovdev/556c7655a85726cb015e91dcd64aafb7 to your computer and use it in GitHub Desktop.
Checkout master branch in an existing not empty directory
# in the folder
git init
git remote add origin [repo-url]
git fetch
git checkout origin/master -ft
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment