Re: Excluding files from git-diff
- From
- Anders Melchiorsen <mail@cup.kalibalik.dk>
- Date
- Oct 17, 2008, 23:38 UTC
- Message-ID
- <48F9220F.5060009@cup.kalibalik.dk>
- In-Reply-To
- <20081017145313.GA23471@eriks>
Erik Hahn wrote:
Show 5 quoted lines
> 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?) >
I don't think that this is what you are asking about, but it's a neat trick anyway :-).
To permanently exclude files from git diff, set up a custom diff driver in ~/.gitconfig:
[diff "nodiff"]
command = /bin/trueand then mention the files that should use this driver in .git/info/attributes:
.gitignore diff=nodiff