From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Victor Bogado da Silva Lins <victor@bogado.net>
Cc: Sean Estabrooks <seanlkml@sympatico.ca>, git@vger.kernel.org
Subject: Re: how to git-archive ignore some files?
Date: Tue, 06 May 2008 23:23:01 +0200 [thread overview]
Message-ID: <4820CC35.3090202@lsrfire.ath.cx> (raw)
In-Reply-To: <BAYC1-PASMTP023026B88005E512F95384AED60@CEZ.ICE>
Sean Estabrooks schrieb:
> On Tue, 06 May 2008 15:15:31 -0300
> Victor Bogado da Silva Lins <victor@bogado.net> 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.
>>
>
> Hi Victor,
>
> You can do something like:
>
> git archive HEAD | \
> tar --delete .gitignore .mailmap .gitattributes | \
> bzip2 -c > archive.tar.bz2
Or, if there is only a small number of files in your repository, you
could do something like this:
git archive HEAD -- \
$(git ls-tree -r --name-only HEAD | grep -v '^\.gitignore$')
To really solve this without external tools, git-archive needed to grow
an --exclude option like git-ls-files, though.
René
next prev parent reply other threads:[~2008-05-06 21:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-06 18:15 how to git-archive ignore some files? Victor Bogado da Silva Lins
2008-05-06 18:56 ` Sean Estabrooks
2008-05-06 21:23 ` René Scharfe [this message]
2008-05-06 22:08 ` Junio C Hamano
2008-05-11 10:44 ` René Scharfe
2008-05-11 16:20 ` Junio C Hamano
2008-05-12 9:36 ` Jakub Narebski
2008-06-08 16:42 ` René Scharfe
2008-05-08 17:04 ` David Bryson
2008-05-08 20:22 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4820CC35.3090202@lsrfire.ath.cx \
--to=rene.scharfe@lsrfire.ath.cx \
--cc=git@vger.kernel.org \
--cc=seanlkml@sympatico.ca \
--cc=victor@bogado.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).