is rebase the same as merging every commit?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Jeske
Date: Thursday, June 26, 2008 - 4:04 pm

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?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
is rebase the same as merging every commit?, David Jeske, (Thu Jun 26, 4:04 pm)
Re: is rebase the same as merging every commit?, Matthieu Moy, (Thu Jun 26, 11:30 pm)
Re: is rebase the same as merging every commit?, David Jeske, (Thu Jun 26, 11:46 pm)
Re: is rebase the same as merging every commit?, Petr Baudis, (Fri Jun 27, 1:34 am)