On the git man page for rebase you can find one example for rebasing branches.
H---I---J topicB
/
E---F---G topicA
/
A---B---C---D master
The command git rebase --onto master topicA topicB
would yield ...
H'--I'--J' topicB
/
| E---F---G topicA
|/
A---B---C---D master
... which is quite reasonable as far as I understand rebasing. Unfortunately the next example shows a different output. Basically it describes how rebasing can be used to remove commits:
E---F---G---H---I---J topicA
According to the man page calling git rebase --onto topicA~5 topicA~3 topicA
would yield ...
E---H'---I'---J' topicA
..., and thus, "remove F
and G
".
But actually I don't see a big difference between the first and the second example:
H---I topicA
/
F---G topicA~3
/
E topicA~5
So the result should be more like
H'--I'--J' topicB
/
| F---G
|/
E
Are F
and G
still there or are they really removed? At least gitk
shows me F
and G
and even H
, I
and J
. Are this unreachable commits? Will they be "garbage-collected" after some time? Or will there be forever on my disk (even pushed to a remote). Can this be applied on the first example as well? Are H
, I
and J
still there?