My company uses git internally and we publish some of our work as an open source on Google Code which uses svn. (Should it support git, the problem would be probably the same.)
The problem is that we publish only part of our repository, so using git-svn as described on http://code.google.com/p/support/wiki/ImportingFromGit will not work.
In git 1.7.11, we use a command like this to export just the raw files of one directory in the repository, without exporting the git control and history. Be sure to run it in an existing directory where you want the files to appear (i.e. make and cd to the destination directory first):
git archive --remote /local/master/project.git HEAD:open/src | tar x
Using the --remote option, you don't even need to run this in a cloned copy, so it can be embedded within any other processes you wrap around your release mechanism.
You can further use the tar options to exclude some files from the selected directory tree.
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