Re: how to git-archive ignore some files?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, 8 May 2008, David Bryson wrote:

> On Tue, May 06, 2008 at 03:15:31PM -0300 or thereabouts, Victor Bogado da Silva Lins wrote:
> > I want to use git-archive to create source packages, but my git 
> > repository has a .gitignore that I don't want to be pushed into the 
> > archive. So is it possible to keep the .gitignore file in the 
> > repository and create an archive(*) without it?
> > 
> > *) using git-archive, off course. 
> 
> Others already discussed the --delete method with tar, [...]

I wonder if the most natural way with Git would not be to create a 
throw-away tree:

cp .git/index .git/tmp-index &&
GIT_INDEX_FILE=.git/tmp-index git rm --cached .gitignore &&
git archive $(GIT_INDEX_FILE=.git/tmp-index git write-tree) &&
rm .git/tmp-index

WARNING: this has not seen any testing.

Ciao,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux