git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ping Yin <pkufranky@gmail.com>
Date
Jan 16, 2009, 05:26 UTC
Message-ID
<46dff0320901152126u2bb9ff55qce9a22c69276bc6a@mail.gmail.com>
In-Reply-To
<7v4p00otpb.fsf@gitster.siamese.dyndns.org>
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
Previous: Junio C Hamano
Message 3 of 3 in “How to exclude some files when using git-archive?”
  1. Ping YinJan 16, 2009
  2. Junio C HamanoJan 16, 2009
  3. Ping YinJan 16, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.