Update hook for selectively allowing non-fast-forward updates

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

 



On 03/29/2013 12:26 PM, Tanu Kaskinen wrote:
> Hi,
>
> I tried to rebase the next branch on master, but pushing a non-fast-forward
> update failed, because the receive.denyNonFastforwards option is set to true.
> If there are no objections, I'll soon remove that option and replace it with
> an update hook that will by default reject non-fast-forward updates, but will
> allow them for explicitly configured branches. The update hook script is
> attached.

Why? In case of the rebase you just use the -f flag.

 From http://git-scm.com/book/ch7-1.html:

receive.denyNonFastForwards

If you rebase commits that you?ve already pushed and then try to push 
again, or otherwise try to push a commit to a remote branch that doesn?t 
contain the commit that the remote branch currently points to, you?ll be 
denied. This is generally good policy; but in the case of the rebase, 
you may determine that you know what you?re doing and can force-update 
the remote branch with a -f flag to your push command.



-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux