lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: removing a single commit from staging


From: David Kastrup
Subject: Re: removing a single commit from staging
Date: Fri, 09 Dec 2011 13:34:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Graham Percival <address@hidden> writes:

> whoops, I forgot that I had to always do
>   touch ../Documentation/*.te??
> before make would actually compile stuff.  As a result, staging is
> broken.
>
> I want to remove
>   9eb76031c027ffdccd2ea5cf86985617a00982b7
> however, how do I do that?  I know that I can force push
> 975c00a63710da2472f57fbb6d5a484541f27c66 (i.e. origin/staging^) to
> staging, which would remove 9eb76, but if anybody had pushed stuff
> to staging in the last 2 minutes, it would delete their work as
> well.
>
> Suggestions?

You can't force a non-forwarding push to staging since the repository
refuses that.  That was what the hook proposal I sent was about.

You have to _remove_ staging, then push a new version (use the path
refs/heads/staging for the creating push since git can't guess that
"staging" is a shorthand for that when it no longer exists).  Everything
that happens between you last updated your staging and the time you
remove staging gets lost as far as the repository is concerned.

People are well advised to keep their changes locally until they have
propagated into master.

It's not like you need many precautions for that: the reflog will make
it actually really hard to lose commits for good (it is usually garbage
collected after three months, more than enough for most use cases).

So unless you habitually remove and recreate your local repository, you
are not likely to get much damage.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]