git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* is rebase the same as merging every commit?
@ 2008-06-26 23:04 David Jeske
  2008-06-27  6:30 ` Matthieu Moy
  0 siblings, 1 reply; 16+ messages in thread
From: David Jeske @ 2008-06-26 23:04 UTC (permalink / raw)
  To: git

Rebasing is described in the docs I've read as turning this: (sorry for the
dots)

..........A---B---C topic
........./
....D---E---F---G master

Into this:

...................A'--B'--C' topic
................../
.....D---E---F---G master

If I understand it right (and that's a BIG if), it's the same as doing a merge
of C into G where every individual commit in the C-line is individually
committed into the new C' line.

...........-------------A---B---C
........../            /   /   /
........./        /---A'--B'--C'  topic
......../        /
....D---E---F---G - master


(1) Is the above model a valid explanation?

(2) From the documentation diagrams, it looks like the rebased A' has only (G)
as a parent, not (A,G). If this is the case, why?  (i.e. not connecting those
nodes throws away useful information)

(3) If it only has (G) as a parent, does the rebase explicitly remove the
source A,B,C nodes from the repository? (the diagrams make it look like it
does) ..or do they just get cleaned up during GC?

^ permalink raw reply	[flat|nested] 16+ messages in thread
* is rebase the same as merging every commit?
@ 2008-06-26 23:04 David Jeske
  2008-06-27  0:51 ` Junio C Hamano
  2008-06-27 10:33 ` しらいしななこ
  0 siblings, 2 replies; 16+ messages in thread
From: David Jeske @ 2008-06-26 23:04 UTC (permalink / raw)
  To: git

Rebasing is described in the docs I've read as turning this: (sorry for the
dots)

..........A---B---C topic
........./
....D---E---F---G master

Into this:

...................A'--B'--C' topic
................../
.....D---E---F---G master

If I understand it right (and that's a BIG if), it's the same as doing a merge
of C into G where every individual commit in the C-line is individually
committed into the new C' line.

...........-------------A---B---C
........../            /   /   /
........./        /---A'--B'--C'  topic
......../        /
....D---E---F---G - master


(1) Is the above model a valid explanation?

(2) From the documentation diagrams, it looks like the rebased A' has only (G)
as a parent, not (A,G). If this is the case, why?  (i.e. not connecting those
nodes throws away useful information)

(3) If it only has (G) as a parent, does the rebase explicitly remove the
source A,B,C nodes from the repository? (the diagrams make it look like it
does) ..or do they just get cleaned up during GC?

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

end of thread, other threads:[~2008-06-27 21:53 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-26 23:04 is rebase the same as merging every commit? David Jeske
2008-06-27  6:30 ` Matthieu Moy
     [not found]   ` <willow-jeske-01l78ZaJFEDjCYTA-01l7GOyLFEDjCV8E>
2008-06-27  6:46     ` David Jeske
2008-06-27  6:46     ` David Jeske
2008-06-27  8:34   ` Petr Baudis
  -- strict thread matches above, loose matches on Subject: below --
2008-06-26 23:04 David Jeske
2008-06-27  0:51 ` Junio C Hamano
2008-06-27  1:08   ` Junio C Hamano
     [not found]     ` <willow-jeske-01l79c1jFEDjCWw6-01l7@0yvFEDjCjEl>
2008-06-27  6:24       ` David Jeske
2008-06-27  6:24       ` David Jeske
2008-06-27  7:34         ` Matthieu Moy
     [not found]           ` <willow-jeske-01l79c1jFEDjCWw6-01l7HsC6FEDjCV3k>
2008-06-27 15:39             ` David Jeske
2008-06-27 15:39             ` David Jeske
2008-06-27  6:31   ` Pascal Obry
2008-06-27 10:33 ` しらいしななこ
2008-06-27 21:51   ` Junio C Hamano

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).