I am trying to extract shallow clone all files from a repository at a specific commit. I would like to extract these files to an alternate location without affecting the HEAD of the existing repository.
This is the command I'm running to get those files...
git --git-dir="C:\temp\repository" --work-tree="C:\temp\files" checkout -f "e2f4b8cf188c87db6a11c6f421b06f701dd6b07b"
The above command works to extract the files I want, but my problem is this leaves my repository with a detached HEAD.
What is the best way to extract these files?
Possible duplicate: How to shallow clone a specific commit with depth 1?
edits for clarification:
- There is an automated process that commits to this repository. (which is why i don't want to detach the HEAD)
- I want to extract all files from the repository from a specific point. (i know the commit id)
- I'd like to extract these files to an alternate location.