Thread (6 messages) flat view 6 messages, 5 authors, 2016-06-15

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

From: Pierre Habouzit <hidden>
Date: 2016-06-15 22:42:47

On Tue, Jan 02, 2007 at 10:58:14PM +0100, Jakub Narebski wrote:
Brian Gernhardt wrote:
quoted
quoted
  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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help