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

Converting commits to patch files? HEAD vs HEAD^

From
MSMarc Singer <elf@buici.com>
Date
Jul 9, 2005, 01:38 UTC
Message-ID
<20050709013859.GA11947@buici.com>

Jeff Garzik's guide doesn't appear to explain how to get patches back out of the system.

I've successfully commited a set of changes.
 # git diff HEAD^ HEAD

This command will produce a diff of the changes I've made. What is the HEAD^? Does it refer to the commit before the last one made?

If I've made several commits, I'd like to be able to gather several together and produce a patch file. Better still, I'd like to be able to pick a set of discontiguous commits an bundle them into a single patch. Ought I be using tags?

Finally, given that the upstream repository is git, what is the way to push commits upstream?

Next: Linus Torvalds
Message 1 of 4 in “Converting commits to patch files? HEAD vs HEAD^”
  1. Marc SingerJul 9, 2005
  2. Linus TorvaldsJul 9, 2005
  3. Junio C HamanoJul 9, 2005
  4. Catalin MarinasJul 9, 2005

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.