Re: Excluding files from git-diff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux