I can't seem to find the answer to this seemingly simple question, anywhere: How do you acquire a clean copy of a code repository once you "release" it? For instance, say I'm at a place in my Git repository where I want to release a copy. How do I copy it without all the Gitiness? I don't want any hidden Git directories, etc. I want a clean deliverable product. Ideas? I'm working with RoR, btw.
Best
You may want git archive, e.g.
git archive --format=tar -o /path/to/archive.tar master
Note that the above gets you a whole tree. If you want, can pare it down to only specific directories, including going down multiple "levels":
git archive --format=tar -o /path/to/archive.tar master somedir/ another/dir/
In your git directory, there's really only one directory that is "gitty," and that is .git.
Here's what I propose, you check out your release branch and copy it elsewhere, except for the .git folder. This packs your working directory into a tarball:
$tar --exclude .git -cjf release.tar.bz2 *
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With