Skip to content

Instantly share code, notes, and snippets.

@mbijon
Created February 8, 2014 01:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbijon/8875213 to your computer and use it in GitHub Desktop.
Save mbijon/8875213 to your computer and use it in GitHub Desktop.
git checkout/clone over the top of an existing set of files
git clone --no-checkout repo-address subdir/tmp
mv subdir/tmp/.git subdir/.git/ # final "/" important
rm -Rf subdir/tmp
cd subdir
git reset --hard HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment