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

Re: applying and committing patches in a single git command

From
EZErez Zilber <erezzi.list@gmail.com>
Date
Jul 15, 2008, 11:03 UTC
Message-ID
<ce513bcc0807150403v75233737w127719dd30e48176@mail.gmail.com>
In-Reply-To
<487C752E.4090707@op5.se>
On Tue, Jul 15, 2008 at 1:00 PM, Andreas Ericsson <ae@op5.se> wrote:
Show 38 quoted lines
> Erez Zilber wrote:
>>
>> On Tue, Jul 15, 2008 at 11:53 AM, Boaz Harrosh <bharrosh@panasas.com>
>> wrote:
>>>
>>> Erez Zilber wrote:
>>>>
>>>> Hi,
>>>>
>>>> Someone created a patch with git-format-patch and sent it to me. I
>>>> would like to apply & commit the patch. If I use git-apply, it only
>>>> patches my tree without committing it. Now, I need to copy the commit
>>>> log, run git-commit and paste the commit log there. Is there a more
>>>> intelligent way to do that?
>>>>
>>>> Thanks,
>>>> Erez
>>>>
>>> git-am, can take all bunch of them at once
>>>
>>> Boaz
>>>
>>
>> Thanks. I have 2 more questions:
>> 1. How can I tell git-am to take a patch from an e-mail from a gmail
>> account?
>
> You can't, but you can save your gmail message to disc and pass
> the saved file to "git am" (don't use "git-am" over "git am";
> we're trying to get away from that old format of typing).
>
>> 2. If I have the actual patch on my machine (not in an e-mail
>> message), I guess that I need something else (not git-am). Is there
>> anything like that?
>>
>
> git apply patchfile
> patch (-p1) < patchfile
Thanks.
Previous: Andreas Ericsson
Message 6 of 6 in “applying and committing patches in a single git command”
  1. Erez ZilberJul 15, 2008
  2. Stephan BeyerJul 15, 2008
  3. Boaz HarroshJul 15, 2008
  4. Erez ZilberJul 15, 2008
  5. Andreas EricssonJul 15, 2008
  6. Erez ZilberJul 15, 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.