impeding move to git, join gitorious.org

Magnus Bergmark magnus.bergmark at gmail.com
Sat Jun 27 23:54:06 CEST 2009


On Sat, Jun 27, 2009 at 11:14 PM, Ian Monroe <ian.monroe at gmail.com> wrote:
>
> Even someone doing a new clone could recover from a force push that
> squashed a bunch of history or something? I kinda doubt it.
>

I cannot confirm this, but I think it is possible to solve this even
for new clones. I do not know how, though, and it would depend on how
often the server does a garbage collection run and removes unused
commits.

*But*, I was talking about a "git guru" doing this for the project, so
I assumed that this person already had a previous state locally and
would restore after doing a fetch/rebase or pull. A new cloning wasn't
what I was talking about, and if this happened for user X during this
downtime, user X would get it fixed when he/she did his/her next pull
(since we are doing another forced push, just with reversed effect).

It would lead to problems in most cases, muck up inexperienced
people's repos and be kind of hard to avoid serious side effects, so
that is why I still didn't recommend going further. I was just
"defending" Git in the statement that is was impossible to fix, which
is untrue. It happened at my work place when I forgot to disable
forced push and a complete newbie just "did what the command told him
to do" and did a force push. I fixed it in 3 minutes without any
earlier experience with this, and if the pushed branch wasn't too
complex I could fix it in 30 seconds now.

> But I think a SCM should be 100% lossless.

Depends on which definition of "lossless" you want. :-)

The data's still there and possible to bring back. Forced pushes are
for power users doing it to their own private and/or semi-public
repos. Git should have this feature disabled by default IMHO. So much
documentation is written just about how to fix and avoid these
problems. Seems easier to just not having it activated at all.

--
Magnus Bergmark - magnus DOT bergmark AT gmail DOT com
GPG/PGP: 0x7BE84794DB6AA648
Fingerprint: 0E6F D2DB F0EF 534A 2184 52AF 7BE8 4794 DB6A A648


More information about the Amarok-devel mailing list