git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Merging commits together into a super-commit
@ 2007-05-10 21:55 linux
  2007-05-11 11:54 ` Alex Riesen
  0 siblings, 1 reply; 27+ messages in thread
From: linux @ 2007-05-10 21:55 UTC (permalink / raw)
  To: git, kernel-hacker

Er... why is everyone making this so complex?

git checkout trunk	# Switch to "trunk"
git checkout branch .	# Overwrite with "branch", but stay on "trunk"
git commit

Now branch is the same tree object as "branch", but without the history.

Of course, you could be even nastier and di a direct

git-commit-tree branch^{tree} -p HEAD < commit_message

But that's not really necessary.


Starting from the branch, using the high-level commands is a bit awkward,
but it's easy enough to:

git-update-ref HEAD trunk
git-commit

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Merging commits together into a super-commit
@ 2007-05-10 10:51 Alex Bennee
  2007-05-10 11:19 ` Raimund Bauer
  2007-05-10 11:40 ` Johannes Sixt
  0 siblings, 2 replies; 27+ messages in thread
From: Alex Bennee @ 2007-05-10 10:51 UTC (permalink / raw)
  To: git

Hi,

I really love the fact I can micro-commit changes when I'm developing.
However at some point the combination of changes I have made can be
considered a single body of work. This is especially true when you start
doing things like re-basing on code that has moved around a lot. You
don't want to be correcting a whole bunch of merge failures for every
commit in your current tree.

So far the only was I can see to do this is a:

git-diff master..HEAD > my.patch

And then re-applying your patch in stages, manually doing the commits.

Am I missing something?

I'm thinking something like git-cherrypick taking multiple commits and
create a new super commit on a new tree. i.e.:

git-cherrypick -m "Valgrind fixes" 12345.. 12678.. 565757..

Merging the existing commit comments would be nice too.

-- 
Alex, homepage: http://www.bennee.com/~alex/
All God's children are not beautiful. Most of God's children are, in
fact, barely presentable. -- Fran Lebowitz, "Metropolitan Life"

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2007-05-13 19:36 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-10 21:55 Merging commits together into a super-commit linux
2007-05-11 11:54 ` Alex Riesen
     [not found]   ` <9909dee80705110537j7e6d1426p7723c110c0a2c667@mail.gmail.com>
2007-05-11 12:41     ` Eugine Kosenko
2007-05-12 13:02       ` Jan Hudec
  -- strict thread matches above, loose matches on Subject: below --
2007-05-10 10:51 Alex Bennee
2007-05-10 11:19 ` Raimund Bauer
2007-05-10 11:32   ` Alex Bennee
2007-05-10 11:43     ` Johannes Schindelin
2007-05-10 11:40 ` Johannes Sixt
2007-05-10 16:01   ` Linus Torvalds
2007-05-10 16:57     ` Carl Worth
2007-05-10 17:14       ` J. Bruce Fields
2007-05-10 18:30         ` Carl Worth
2007-05-10 19:21           ` Petr Baudis
2007-05-10 19:48             ` Carl Worth
2007-05-10 20:29               ` Robin Rosenberg
2007-05-12 11:34               ` Yann Dirson
2007-05-12 13:59                 ` Jakub Narebski
2007-05-12 14:02                 ` Karl Hasselström
2007-05-12 14:41                   ` Yann Dirson
2007-05-12 17:03                     ` Karl Hasselström
2007-05-12 19:27                     ` Junio C Hamano
2007-05-13 18:43                       ` Karl Hasselström
2007-05-13 19:35                       ` Yann Dirson
2007-05-10 19:22           ` J. Bruce Fields
2007-05-10 19:47             ` Petr Baudis
2007-05-10 19:51               ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).