Option 1: Exclude the .git Subdirectory
Assuming you have the default setting for your Git repository, you can just copy everything into your project, but exclude the .git subdirectory.
Obviously, you can do this with a bash terminal using rsync :
rsync -av --exclude='.git' source destination
but I'm not sure how you could do this with Windows copy .
Option 2: Git export archive
Another option is to use git archive :
git archive --format zip --output "output.zip" master -0
will provide you with an uncompressed archive ( -0 is the uncompressed flag). The problem is that you need to extract files from the archive.
If you have access to Unix tools in the form of a bash or Cygwin shell, you can also use these Unix tools in janos answer . See Also How to export git (for example, "export svn") .
# Option 3: Use Git ls-files
There are problems with this, because I am passing the cp arguments in the wrong order (files as destination directories instead of sources), so clean this up for now.
Another option is to get a list of all the files that Git tracks in your working copy, and then pass them as an argument to the copy command. Here is an example with Unix cp :
git ls-files | xargs cp <destination-root>
user456814
source share