lilypond-devel
[Top][All Lists]
Advanced

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

Re: GIT help


From: Johannes Schindelin
Subject: Re: GIT help
Date: Mon, 29 Oct 2007 11:35:30 +0000 (GMT)

Hi,

On Mon, 29 Oct 2007, Rune Zedeler wrote:

> Because I by mistake did a merge of the master into dev/rune before the last
> time I pushed to git.sv.gnu.org, I undid these changed in my local branch
> before making my new changes locally.
> But now, if I do
> 
> $ git push -f ssh+git://address@hidden/srv/git/lilypond.git/
> dev/rune:dev/rune
> 
> Then git replies
> 
> error: denying non-fast forward refs/heads/dev/rune (you should pull first)
> ng refs/heads/dev/rune non-fast forward
> 
> - and the push is not done.
> I totally don't understand this - I thought that this was what the -f was
> for.
> I am afraid that my old mistaken changes (that is, the merge with master
> branch) will be merged into my new changes if I do what it tells me, and do a
> pull.
> 
> Help!

For shared repositories (such as on git.sv.gnu.org), non-fast-forwarding 
pushes are not allowed.

The rationale is this: if somebody pulls from you, and you push some 
non-fast-forwarding revision, the next pull of that somebody will be a 
true merge, even if she did not change anything!

In your case, I think the number of pullers is relatively small, and you 
can make everybody aware of your fix by sending a message either to this 
list, or to the pullers directly.

The workaround, then, to force a non-fast-forwarding push is

        # delete the branch on the remote
        $ git push <remote> :rune

        # push the "new" branch
        $ git push <remote> rune

But please be aware of the implications whenever you do something like 
that!

Hth,
Dscho





reply via email to

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