# git archive ignores .gitignored files?

3 messages from 2007-07-26 to 2007-07-26. Participants: Brian Downing.
Thread: https://gitlist.dev/t/9245

## Brian Downing, 2007-07-26 17:32

Subject: git archive ignores .gitignored files?
Message-ID: <20070726173206.GR21692@lavos.net>
URL: https://gitlist.dev/e/20070726173206.GR21692%40lavos.net

```
git archive seems to not output files marked in .gitignore.  I find
this behavior a little perplexing, since it does not create an archive
from the working directory, and if something is committed, even if it
is marked in .gitignore, it should probably wind up in the archive.

The reason I discovered this is that I'm trying to keep a debian build
branch for Git, and the debain/git-daemon directory was mysteriously
missing from anything generated with git archive, as "git-daemon" is
in Git's /.gitignore.

Is this intended behavior?  It seems kind of a misfeature to me.

(Of course it's possible /.gitarchive should have "/git-daemon" rather
than "git-daemon"; that's certainly how I will work around the issue.)

-bcd

```

## Brian Downing, 2007-07-26 17:36

Subject: Re: git archive ignores .gitignored files?
Message-ID: <20070726173635.GS21692@lavos.net>
URL: https://gitlist.dev/e/20070726173635.GS21692%40lavos.net
In-Reply-To: <20070726173206.GR21692@lavos.net>

```
On Thu, Jul 26, 2007 at 12:32:06PM -0500, Brian Downing wrote:
> git archive seems to not output files marked in .gitignore.

Never mind; it is "git add" that ignored the file.  Oops.

-bcd

```

## Brian Downing, 2007-07-26 17:54

Subject: Re: git archive ignores .gitignored files?
Message-ID: <20070726175407.GT21692@lavos.net>
URL: https://gitlist.dev/e/20070726175407.GT21692%40lavos.net
In-Reply-To: <20070726173635.GS21692@lavos.net>

```
On Thu, Jul 26, 2007 at 12:36:35PM -0500, Brian Downing wrote:
> On Thu, Jul 26, 2007 at 12:32:06PM -0500, Brian Downing wrote:
> > git archive seems to not output files marked in .gitignore.
> 
> Never mind; it is "git add" that ignored the file.  Oops.

For what it's worth, if I do (in the git tree):

mkdir foo
touch foo/file
mkdir foo/git-daemon
touch foo/git-daemon/file

"git add foo" does not produce any warnings that "foo/git-daemon" was
ignored.  If "foo/file" does not exist it warns that "foo" was not
added.

-bcd

```
