Skip to content

Instantly share code, notes, and snippets.

@seanblanton
Created March 18, 2017 03:53
Show Gist options
  • Save seanblanton/9918638d996a581cc03b55104f3c4d1f to your computer and use it in GitHub Desktop.
Save seanblanton/9918638d996a581cc03b55104f3c4d1f to your computer and use it in GitHub Desktop.
How to copy everything from a repo in a specific folder
#!/bin/sh
git --work-tree=/var/www/html/ --git-dir=/var/repo/repoName.git checkout -f master -- _site/
cd /var/www/html/
cp -rRp _site/. .
rm -rf _site
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment