From: Anders Melchiorsen Date: Fri, 17 Oct 2008 23:38:55 GMT Subject: Re: Excluding files from git-diff Message-ID: <48F9220F.5060009@cup.kalibalik.dk> In-Reply-To: <20081017145313.GA23471@eriks> Erik Hahn wrote: > 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/true and then mention the files that should use this driver in .git/info/attributes: .gitignore diff=nodiff