Skip to content

Instantly share code, notes, and snippets.

@apeiros
Created February 7, 2013 18:12
Show Gist options
  • Save apeiros/4732913 to your computer and use it in GitHub Desktop.
Save apeiros/4732913 to your computer and use it in GitHub Desktop.
Copy a directory from the repository in a specific revision outside the repository
ref=`git symbolic-ref --short HEAD` && \
git checkout SOME_REVISION && \
cp -r some/dir /to/dir/outside/of/repo && \
git checkout $ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment