{"thread":{"id":"2809","subject":"patches between commits","startedAt":"2005-12-12T15:31:12Z","lastAt":"2005-12-12T17:54:45Z","messageCount":3,"participants":["Bahadir Balban","Alex Riesen","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"13509","messageId":"7ac1e90c0512120731g3eacdcf0s7e9d1226c88dce73@mail.gmail.com","threadId":"2809","inReplyTo":null,"subject":"patches between commits","fromName":"Bahadir Balban","fromEmail":"bahadir.balban@gmail.com","sentAt":"2005-12-12T15:31:12Z","receivedAt":"2005-12-12T15:31:12Z","isPatch":false,"sender":{"key":"bahadir.balban@gmail.com","avatar":null},"body":"Hi,\n\nA very basic question - how could I generate patches across different commits?\n\nSuppose I have a HEAD branch, which is the latest. And I want to\ngenerate `individual' patches for each commit I did since the\nbeginning of development for this branch.\n\nSecondly, is the sha1 of a tree what appears next to each commit when\nI type git-log? Is this the only command that lets us know the sha1's\nof commits?\n\nThanks,\nBahadir\n"},{"id":"13516","messageId":"20051212173352.GA3007@steel.home","threadId":"2809","inReplyTo":"7ac1e90c0512120731g3eacdcf0s7e9d1226c88dce73@mail.gmail.com","subject":"Re: patches between commits","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2005-12-12T17:33:52Z","receivedAt":"2005-12-12T17:33:52Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Bahadir Balban, Mon, Dec 12, 2005 16:31:12 +0100:\n> Suppose I have a HEAD branch, which is the latest. And I want to\n> generate `individual' patches for each commit I did since the\n> beginning of development for this branch.\n\nThat is what I think \"git format-patch <commit>\" is for. It will\ngenerate patches to bring \"<commit>\" to HEAD.\n\n> Secondly, is the sha1 of a tree what appears next to each commit when\n> I type git-log? Is this the only command that lets us know the sha1's\n> of commits?\n\n\"git rev-list\", I think\n"},{"id":"13518","messageId":"7vu0dei4ka.fsf@assigned-by-dhcp.cox.net","threadId":"2809","inReplyTo":"20051212173352.GA3007@steel.home","subject":"Re: patches between commits","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-12T17:54:45Z","receivedAt":"2005-12-12T17:54:45Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alex Riesen <raa.lkml@gmail.com> writes:\n\n> Bahadir Balban, Mon, Dec 12, 2005 16:31:12 +0100:\n>> Suppose I have a HEAD branch, which is the latest. And I want to\n>> generate `individual' patches for each commit I did since the\n>> beginning of development for this branch.\n>\n> That is what I think \"git format-patch <commit>\" is for. It will\n> generate patches to bring \"<commit>\" to HEAD.\n\nYes, but I think the real question Bahadir wants to know is what\nthe <commit> parameter should be, if you want to export the\nwhole history (I do not think there is any suitable argument to\n\"format-patch\" that does this).\n\n>> Secondly, is the sha1 of a tree what appears next to each commit when\n>> I type git-log? Is this the only command that lets us know the sha1's\n>> of commits?\n\nDepends on what you have, to ask the question \"what are their\nobject names?\".\n\n - I have this commit, how do I find out its object name?\n   E.g. I want to know the HEAD commit's object name, second to\n   the last commit on \"test\" branch.\n\n   $ git rev-parse --verify HEAD\n   $ git rev-parse --verify test^\n\n - I have bunch of commits leading to the head of my \"test\"\n   branch.  What are they?\n\n   $ git rev-list test ;# unadorned list of object names and nothing else\n   $ git rev-list --pretty test ;# this is git-log\n   $ git whatchanged -m -M -p test ;# with patch in full glory\n"}]}