Git development
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: David Bryson <david@statichacks.org>
Cc: Victor Bogado da Silva Lins <victor@bogado.net>, git@vger.kernel.org
Subject: Re: how to git-archive ignore some files?
Date: Thu, 8 May 2008 21:22:07 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.1.00.0805082118390.30431@racer> (raw)
In-Reply-To: <20080508170442.GK9562@eratosthenes.sbcglobal.net>

Hi,

On Thu, 8 May 2008, David Bryson wrote:

> On Tue, May 06, 2008 at 03:15:31PM -0300 or thereabouts, Victor Bogado da Silva Lins 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. 
> 
> Others already discussed the --delete method with tar, [...]

I wonder if the most natural way with Git would not be to create a 
throw-away tree:

cp .git/index .git/tmp-index &&
GIT_INDEX_FILE=.git/tmp-index git rm --cached .gitignore &&
git archive $(GIT_INDEX_FILE=.git/tmp-index git write-tree) &&
rm .git/tmp-index

WARNING: this has not seen any testing.

Ciao,
Dscho

      reply	other threads:[~2008-05-08 20:23 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
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 [this message]

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=alpine.DEB.1.00.0805082118390.30431@racer \
    --to=johannes.schindelin@gmx.de \
    --cc=david@statichacks.org \
    --cc=git@vger.kernel.org \
    --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