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

Re: [RFC] Re: git-svn: make git-svn commit-diff able to work without explicit arguments

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 2, 2007, 21:58 UTC
Message-ID
<enekbs$n8g$1@sea.gmane.org>
In-Reply-To
<052E1601-5422-48A0-81B3-9A454467CE5F@silverinsanity.com>
Brian Gernhardt wrote:
Show 21 quoted lines
>>   The reason is simple, I often use git commit as :wq in my editor,  
>> and
>> sometimes think that in a A--B--C--D and in fact, I'd prefer to have:
>>
>>   {A,C}--B--D. how is it possible to do that in a not too cumbersome
>> way? because that would make sens to work in some scratch branch, and
>> then reorganize patches in a saner better way in the master branch.
>>
>>   But I fail to see how to achieve that without using cumbersome
>> export-to-patch then git apply patch and edit logs which is painful  
>> and
>> not really using git.
> 
> The command you seem to be looking for is git-cherry-pick.  To  
> combine the two commits, I'd do something like:
> 
> $ git cherry-pick A
> $ git cherry-pick C
> $ git reset HEAD~2
> $ git add <files>
> $ git commit

Or better learn about --no-commit option of git-cherry-pick. Or if you don't mind additional tools I think you can do this using StGIT.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Brian GernhardtNext: Pierre Habouzit
Message 7 of 10 in “[RFC] git-svn: make git-svn commit-diff able to work without explicit arguments”
  1. Steve FrécinauxJan 2, 2007
  2. [RFC] Re: git-svn: make git-svn commit-diff able to work without explicit argumentsPierre Habouzit, Jan 2, 2007
  3. Eric WongJan 2, 2007
  4. Junio C HamanoJan 2, 2007
  5. [RFC] Re: git-svn: make git-svn commit-diff able to work without explicit argumentsPierre Habouzit, Jan 2, 2007
  6. Brian GernhardtJan 2, 2007
  7. Jakub NarebskiJan 2, 2007
  8. [RFC] Re: git-svn: make git-svn commit-diff able to work without explicit argumentsPierre Habouzit, Jan 2, 2007
  9. Junio C HamanoJan 2, 2007
  10. Steve FrécinauxJan 2, 2007

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.