[Olsr-dev] Possible to fix errors in git repo?
Ferry Huberts
(spam-protected)
Wed Jun 15 10:45:14 CEST 2011
On 06/15/2011 10:19 AM, Henning Rogge wrote:
> On Wed June 15 2011 09:34:35 Ferry Huberts wrote:
>> any pushes to the new repo must be rebased on the new repo.
>> this is trivial but must be enforced to prevent the old tree getting
>> back into the repo.
>
> I have been not able to reproduce this... even with a "git rebase" before the
> push back into the main repository, the bad commits are again uploaded.
>
> Can you tell what kind of steps you are suggesting ?
you'll want to do a git rebase -i and then remove all commits of the old
tree that are not in your branch that you want to rebase: all commit
sha's are different so removing the old commits is needed: you have to
look up the common ancestor yourself.
example:
old:
a-b-c-d-e-f (master)
\
u-v-w (your branch)
new:
k-l-m-n-o-p
git checkout your branch
git rebase -i m
you'll (probably) get a list like:
a
b
c
u
v
w
and you'll have to remove a-b-c
finally you can push your branch into the repo
yes, your local repo will still have the old tree, but the remote repo
will not
:-)
>
> The other problem I see is that we have no way to enforce this on the client
> side. So even if we do it correctly, it takes a single push from an old
> repository to get back the old commits, right ?
it's also quiet difficult to enforce on the server side. the easiest way
is to disable write access to the repo except for a few select people
who become integrators and manually enforce this until everyone is aware.
I personally think it's a mistake to give everybody write access.
It's much better for quality and control to have few people with commit
access. However, I'm new to the project, just my 2 cents :-)
>
> Henning Rogge
--
Ferry Huberts
More information about the Olsr-dev
mailing list