Skip to content

Instantly share code, notes, and snippets.

@apeiros
Created February 7, 2013 18:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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