Skip to content

Instantly share code, notes, and snippets.

@mykt0ngc0
Last active May 30, 2022 06:25
Show Gist options
  • Save mykt0ngc0/6af606d205e86d1e922eca68291c64f6 to your computer and use it in GitHub Desktop.
Save mykt0ngc0/6af606d205e86d1e922eca68291c64f6 to your computer and use it in GitHub Desktop.
Clone a repo to non-empty local directory
git init
git remote add origin PATH/TO/REPO
git fetch
git checkout -t origin/dev -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment