Extracting a distributable file tree from git and svn

I would like to get a file tree representing a specific (or latest) tag/branch/label from a repository. Trawling the help files shows me how to manipulate the repository itself, but not to extract the subset that represents just the code. I have done the brute force recursive removal of the .git (or .svn) dirs to get the latest set of files, but there must be a better way.

On Sat, Apr 13, 2013 at 10:57 PM, Allan Duncan <amd2345@fastmail.com.au> wrote:
I would like to get a file tree representing a specific (or latest) tag/branch/label from a repository. Trawling the help files shows me how to manipulate the repository itself, but not to extract the subset that represents just the code.
Have you tried `git archive' That sounds like what you are looking for. -Matt

On 2013-04-14 00:41, Matt Davis wrote:
On Sat, Apr 13, 2013 at 10:57 PM, Allan Duncan <amd2345@fastmail.com.au> wrote:
I would like to get a file tree representing a specific (or latest) tag/branch/label from a repository. Trawling the help files shows me how to manipulate the repository itself, but not to extract the subset that represents just the code.
Have you tried `git archive' That sounds like what you are looking for.
And I believe the nearest equivalent in 'svn' is 'svn export'. -- Regards, Matthew Cengia

On 14/04/13 06:17, Matthew Cengia wrote:
On 2013-04-14 00:41, Matt Davis wrote:
On Sat, Apr 13, 2013 at 10:57 PM, Allan Duncan <amd2345@fastmail.com.au> wrote:
I would like to get a file tree representing a specific (or latest) tag/branch/label from a repository. Trawling the help files shows me how to manipulate the repository itself, but not to extract the subset that represents just the code.
Have you tried `git archive' That sounds like what you are looking for.
And I believe the nearest equivalent in 'svn' is 'svn export'.
It turns out that the svn I tried it on was more complicated than I realised, and I didn't get what I expected. A simpler svn yielded the distr that I wanted. Thanks.

On 14/04/13 00:41, Matt Davis wrote:
On Sat, Apr 13, 2013 at 10:57 PM, Allan Duncan <amd2345@fastmail.com.au> wrote:
I would like to get a file tree representing a specific (or latest) tag/branch/label from a repository. Trawling the help files shows me how to manipulate the repository itself, but not to extract the subset that represents just the code.
Have you tried `git archive' That sounds like what you are looking for.
-Matt
I had a look at that and thought it meant archiving the entire tree, but I have now given it a try and LO! it makes a distro set. Thanks.
participants (4)
-
Allan Duncan
-
Jason White
-
Matt Davis
-
Matthew Cengia