git/list[1] front-page[2] threads[3] people[4] search[5] about
 

How to exclude files from "git diff"

From
HLH.J. Lu <hjl.tools@gmail.com>
Date
Dec 18, 2009, 17:09 UTC
Message-ID
<6dc9ffc80912180909q2e9cbe30r7c802a2152c5954@mail.gmail.com>
Hi,

I have some bookkeeping files in my git repository. How do I exclude them from "git diff"? Does "git diff" support

# git diff --exclude="foo.*.bar*"
Please CC me since I am not on the git mailing list.
Thanks.
-- 
H.J.
Next: Jeff King
Message 1 of 7 in “How to exclude files from "git diff"”
  1. H.J. LuDec 18, 2009
  2. Jeff KingJan 5, 2010
  3. H.J. LuJan 5, 2010
  4. Dmitry PotapovJan 5, 2010
  5. H.J. LuJan 5, 2010
  6. Nguyen Thai Ngoc DuyJan 5, 2010
  7. Junio C HamanoJan 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.