git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Erik Hahn <erik_hahn@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: Excluding files from git-diff
Date: Fri, 17 Oct 2008 17:18:26 +0200	[thread overview]
Message-ID: <48F8ACC2.1010903@drmicha.warpmail.net> (raw)
In-Reply-To: <20081017145313.GA23471@eriks>

Erik Hahn venit, vidit, dixit 17.10.2008 16:53:
> I'm currently working on a script whose developer does not use
> git. Hence, when I mail him the patch, I don't want to include the
> .gitignore file. Is it possible to exclude a file from git-diff (except
> not adding it to git, of course?)

Am I right in assuming that by "script" you mean a manuscript consisting
of several files, rather than a single script (programme in scripting
language)? In any case:

git diff commit1 commit2 file

gives you the diff for "file" between those commits, so if you're really
interested in one file that's the way to go; you can also specify more
than one file here.

On the other hand, your .gitignore probably doesn't change that often,
so that it shouldn't show up in the diff after that anyways. Or put it
in .git/info/excludes.

Cheers,
Michael

  parent reply	other threads:[~2008-10-17 15:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-17 14:53 Excluding files from git-diff Erik Hahn
2008-10-17 15:08 ` Raphael Zimmerer
2008-10-17 15:08 ` Johannes Schindelin
2008-10-17 15:18 ` Michael J Gruber [this message]
2008-10-17 16:30   ` Christian Jaeger
2008-10-17 17:33     ` Eric Raible
2008-10-18  3:50       ` Christian Jaeger
2008-10-18 15:59     ` Jeff King
2008-10-18 16:08       ` Christian Jaeger
2008-10-18 16:14         ` Jeff King
2008-10-18 16:58           ` Jeff King
2008-10-17 23:38 ` Anders Melchiorsen

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=48F8ACC2.1010903@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=erik_hahn@gmx.de \
    --cc=git@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).