Re: interactive rebase results across shared histories
- From
- Seb <spluque@gmail.com>
- Date
- Feb 23, 2016, 23:05 UTC
- Message-ID
- <87egc358ou.fsf@gmail.com>
- In-Reply-To
- <56CCE3C2.1050608@moritzneeb.de>
On Tue, 23 Feb 2016 23:57:06 +0100, Moritz Neeb <lists@moritzneeb.de> wrote:
[...]
Show 5 quoted lines
>> OK, I've followed this advice and looked at the dependency graphs in >> gitk before and after rebasing, I've managed to obtain what I was >> after. The repository now has two branches: master and topic. >> However, Gitk reveals a problem with a string of commits that are not >> part of any branch:
>> A---B---H---I (master) \ C---D---E (loose string of commits) \ >> D'---E'---F---G (topic)
>> How do I remove these loose commits (C, D, E)?
> what you might be after is "git gc". But I never used it, it was not > neccesary for me. I would let the automatic garbage collection drop my > dangling commits. It's safer - who knows when you will still want to > restore your recent "loose string of commits".
> How exactly are the loose commits causing trouble?
Sure enough, these dangling commits were removed automatically without any intervention. All is good.
Thanks!
-- Seb