threads / discuss / 17198

How to exclude some files when using git-archive?

Subject: How to exclude some files when using git-archive?

## tl;dr

3 messages between Jan 16, 2009 and Jan 16, 2009.

replies: 2people: 2as markdown or json

Junio C Hamano· Jan 16, 2009, 02:44 UTC · re: Ping Yin · lore

Re: How to exclude some files when using git-archive?

Ping Yin <pkufranky@gmail.com> writes:
> I want to exclude .gitignore from the archive, but hasn't find a easy way
>
> Ping Yin
"man gitattributes", then look for export-ignore?
Ping Yin· Jan 16, 2009, 05:26 UTC · re: Junio C Hamano · lore

Re: How to exclude some files when using git-archive?

On Fri, Jan 16, 2009 at 10:44 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
> Ping Yin <pkufranky@gmail.com> writes:
>
>> I want to exclude .gitignore from the archive, but hasn't find a easy way
>>
>> Ping Yin
>
> "man gitattributes", then look for export-ignore?
>
>
Thanks. That's exactly what i want.

One question: It seems the .gitattributes doesn't take effect when using following command

GIT_DIR=A/.git git archive HEAD > A.tar
where the files with attribute export-ignore are still exported.
Instead, i have to run
cd A && git archive HEAD > A.tar
Ping Yin

← back to recent threads