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

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

From
Pierre Habouzit <madcoder@debian.org>
Date
Jan 2, 2007, 22:27 UTC
Message-ID
<20070102222708.GG17898@hades.madism.org>
In-Reply-To
<enekbs$n8g$1@sea.gmane.org>
On Tue, Jan 02, 2007 at 10:58:14PM +0100, Jakub Narebski wrote:
Show 26 quoted lines
> Brian Gernhardt wrote:
> 
> >>   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.
  oh those solutions look awsome and easily scriptable, which is
exactly what I need, and it feels simpler to use for my small brain than
the solution Junio proposed. thanks a lot !
  I wonder why I never got to that alone ...
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Jakub NarebskiNext: Junio C Hamano
Message 8 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.