Jan Kratochvil | 19 Mar 2011 22:45
Picon
Favicon

Re: Apologies for wrong commit error

Hi Pierre,

On Sat, 19 Mar 2011 22:34:58 +0100, Pierre Muller wrote:
>  Could someone with enough git knowledge 
> check that the second did exactly cancel the first wrong commit?

It seems OK now to me.
git diff cdf4dfaa567c4903b2fce0a16a2e5702e059932e..c40415cfe4d602ded27d296c771006609596d5f4
shows no change.

>   Can an admin completely wipe my error out?

AFAIK it should not affect operations with master.  It is now more a problem
for the archer-muller-windows-multi branch as AFAIK there is no way to do a
real undo of a GIT merge.  GIT will now still think the current version of
archer-muller-windows-multi is already present in master, therefore this
command now no longer shows what has changed on archer-muller-windows-multi
(even if master has more recent updates):
	git diff origin/master...origin/archer-muller-windows-multi

Regards,
Jan

Joel Brobecker | 20 Mar 2011 00:31
Favicon

Re: [Archer] Re: Apologies for wrong commit error

> AFAIK it should not affect operations with master.  It is now more a problem
> for the archer-muller-windows-multi branch as AFAIK there is no way to do a
> real undo of a GIT merge.  GIT will now still think the current version of
> archer-muller-windows-multi is already present in master, therefore this
> command now no longer shows what has changed on archer-muller-windows-multi
> (even if master has more recent updates):
> 	git diff origin/master...origin/archer-muller-windows-multi

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.

--

-- 
Joel

Pierre Muller | 20 Mar 2011 00:46
Picon

RE: [Archer] Re: Apologies for wrong commit error

> 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 <at> 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

Pierre Muller | 20 Mar 2011 00:40
Picon

RE: Apologies for wrong commit error


> -----Message d'origine-----
> De : archer@...
[mailto:archer@...] De la part de
> Jan Kratochvil
> Envoyé : samedi 19 mars 2011 22:46
> À : Pierre Muller
> Cc : archer@...
> Objet : Re: Apologies for wrong commit error
> 
> Hi Pierre,
> 
> On Sat, 19 Mar 2011 22:34:58 +0100, Pierre Muller wrote:
> >  Could someone with enough git knowledge
> > check that the second did exactly cancel the first wrong commit?
> 
> It seems OK now to me.
> git diff
> cdf4dfaa567c4903b2fce0a16a2e5702e059932e..c40415cfe4d602ded27d296c77100
> 6609596d5f4
> shows no change.

  Thank you for the check,
I got strange results when I tried to do the same...

> >   Can an admin completely wipe my error out?
> 
> AFAIK it should not affect operations with master.  It is now more a
> problem
> for the archer-muller-windows-multi branch as AFAIK there is no way to
(Continue reading)


Gmane