This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
RE: [Archer] Re: Apologies for wrong commit error
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Joel Brobecker'" <brobecker at adacore dot com>, "'Jan Kratochvil'" <jan dot kratochvil at redhat dot com>
- Cc: <archer at sourceware dot org>
- Date: Sun, 20 Mar 2011 00:46:27 +0100
- Subject: RE: [Archer] Re: Apologies for wrong commit error
- References: <006b01cbe67d$7f308da0$7d91a8e0$@muller@ics-cnrs.unistra.fr> <20110319214549.GA4744@host1.jankratochvil.net> <20110319233114.GD2534@adacore.com>
> You could undo the change by forcing the HEAD (reference) back to
> the commit prior to the accidental one. I've never actually done
> this before, but something like this, perhaps:
>
> % git reset --hard <SHA1>
> % git push origin master
>
> This should restore the history to what it was prior to accidental
> commit.
As expected in my previous email, this is not possible:
Pierre@E6510-Muller ~/git/archer
$ git push --force origin master
Total 0 (delta 0), reused 0 (delta 0)
remote: error: denying non-fast-forward refs/heads/master (you should pull
first
)
To ssh://sourceware.org/git/archer.git
! [remote rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://sourceware.org/git/archer.git'
Thus my error is written in stone forever :(
Pierre