[Kde-scm-interest] pushing rebased shared branches

Ian Monroe ian at monroe.nu
Mon Aug 8 13:14:30 UTC 2011


On Mon, Aug 8, 2011 at 13:21, Michael Jansen <kde at michael-jansen.biz> wrote:
> On Monday, August 08, 2011 12:39:02 PM Marcel Wiesweg wrote:
>> Hi,
>>
>> I have been fixing branches of SoK students, removing some dirty manual
>> merges and branch mixups, by interactive rebase.
>> I'm fully aware of the implications of rewriting history.
>>
>> I had the recollection we could now force-push branches, but:
>>
>> remote: + refs/heads/sok/presentation digikam mwiesweg DENIED by fallthru
>> remote: error: hook declined to update refs/heads/sok/presentation
>> To ssh://git@git.kde.org/digikam
>>  ! [remote rejected] presentation -> sok/presentation (hook declined)
>>
>> Missing something here?
>>
>> I believe I can delete branches, so the alternative procedure would be to
>> delete the branch and recreate it under the same name?
>
> I do not like rewriting history of published branches in any way. If you have
> to do it why don't you do it the clean way?
>
> Push the rewritten history into a new branch? Delete the old, keep the old?
> Noone will have to recover from anything, everyone will have the new version
> without trouble and given the way git works it should perform too.
>
> Just be aware of the mail problem ben mentioned. Push in small doses if
> necessary.
>
> I would propose to do it like that.
>
> my-clean-history-branch-01
> my-clean-history-branch-02
> my-clean-history-branch-03
> ....
>
> or
> my-rwritten-history-branch-2011-07-01
> my-rwritten-history-branch-2011-07-20
> my-rwritten-history-branch-2011-08-08

This solution doesn't address the problems Ben mentioned. 100 commits
is a lot though so maybe isn't relevant to the OP.

I don't think it matters much whether you rename or delete, especially
given that "deleting" a branch is really just renaming it (it gets put
in some slightly hidden ref).

Ian


More information about the Kde-scm-interest mailing list