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

Re: how to get 'git diff' to output patch to file

From
Alex Riesen <raa.lkml@gmail.com>
Date
May 14, 2009, 12:03 UTC
Message-ID
<81b0412b0905140503n527d6a3ah34f4cdb72b0ce4c@mail.gmail.com>
In-Reply-To
<93C432AD0B8F4D25A19E0D67C535376A@HPLAPTOP>
2009/5/14 Aaron Gray <aaronngray.lists@googlemail.com>:
> How do I get 'git diff -u' to output to a file or standard out instead of
> its viewer ?
>
  git diff -u > file
  GIT_PAGER=: git diff -u (stdout)
or, depending on how old your Git is
  git --no-pager diff -u
Previous: Aaron Gray
Message 2 of 2 in “how to get 'git diff' to output patch to file”
  1. Aaron GrayMay 14, 2009
  2. Alex RiesenMay 14, 2009

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.