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

[PATCH] git-format-patch(1)- add note about creating patch for single commit

From
Dan McGee <dpmcgee@gmail.com>
Date
Oct 19, 2008, 04:54 UTC
Message-ID
<1224392084-12956-1-git-send-email-dpmcgee@gmail.com>
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
---

I thought this would be helpful because it took me the beter part of an hour to find a solution instead of specifying C~1..C or other crazy things. The current documentation just leaves you hanging when what you really want is just one formatted patch.

If there any suggestions on better wording, feel free to resubmit or whatever- I just felt like this should be documented somewhere.

 Documentation/git-format-patch.txt |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index adb4ea7..8518c33 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -46,7 +46,9 @@ applies to that command line and you do not get "everything
 since the beginning of the time".  If you want to format
 everything since project inception to one commit, say "git
 format-patch \--root <commit>" to make it clear that it is the
-latter case.
+latter case.  If you want to format only a single commit, say "git
+format-patch <commit>^!" (which excludes all parent revisions of the
+specified commit).
 
 By default, each output file is numbered sequentially from 1, and uses the
 first line of the commit message (massaged for pathname safety) as
-- 
1.6.0.2
Next: Junio C Hamano
Message 1 of 4 in “git-format-patch(1)- add note about creating patch for single commit”
  1. git-format-patch(1)- add note about creating patch for single commitDan McGee, Oct 19, 2008
  2. Junio C HamanoOct 19, 2008
  3. Dan McGeeOct 19, 2008
  4. Junio C HamanoOct 19, 2008

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.