title: git ignoring .gitattributes pattern
body: <p>I've a directory structure like this:</p>
  
  <pre><code>root/
    .git
    deploy/
    Site/
      blah/
      more_blah/
        something.local
        else.development
      Rakefile
      .gitattributes
  </code></pre>
  
  <hr>
  
  <p>Edit: to further clarify the above, directories have a trailing <code>/</code> and children are indented beneath a directory, so <code>blah</code> and <code>more_blah</code> are directories but <code>Rakefile</code> and <code>.gitattributes</code> are files, but all four are children of <code>Site</code>.</p>
  
  <hr>
  
  <p>I'm running <code>git-archive</code> from the <code>Site</code> directory like so:</p>
  
  <pre><code>git archive --format=tar --prefix=git-v0.0.1/ v0.0.1 | gzip &gt; ../deploy/git-v0.0.1.tar.zip
  </code></pre>
  
  <p>but whatever pattern I put in .gitattributes, the resulting archive always contains <code>Rakefile</code>. I've tried:</p>
  
  <ul>
  <li>Rakefile</li>
  <li>Site/Rakefile</li>
  <li>*/Rakefile</li>
  <li>./Rakefile</li>
  <li>Rakefile*</li>
  <li>*</li>
  </ul>
  
  <p>None of them work as I'd expect. Is anyone willing to point out the obvious yet non-obvious to me solution? Any help is much appreciated.</p>
  
  <hr>
  
  <p>My apologies for not being clear. </p>
  
  <ul>
  <li>I said the <em>pattern</em> I was using didn't seem to work, but I am using "export-ignore" after the pattern.</li>
  <li><code>Rakefile</code> is not a directory, just a file</li>
  <li><strike>The .gitattributes file is successful in removing other patterns from the archive, <code>Rakefile</code> is not the only pattern used, but is the only one that doesn't work. It doesn't work whether I have it on its own or with other patterns, and at any place in the file.</strike> This is not true, due to having renamed certain files but not archiving the commit with the rename I was appearing to get some good results. My bad! :S</li>
  </ul>
  
  <p>This is my <code>.gitattributes</code> (sitting in the directory <code>Site</code>)</p>
  
  <pre><code>Rakefile        export-ignore
  *.local         export-ignore
  *.development   export-ignore
  *.staging       export-ignore
  </code></pre>