Protection from merge commits

Sam Varshavchik mrsam at
Wed Sep 11 22:35:54 UTC 2013

Pete Zaitcev writes:

> Dear All:
> I found that I pushed a merge node into Fedora git (fortunately it was
> only on f19 branch, not in Rawhide):
> commit 51eec48c20ba57054f17ba29f23e6a0aa36df9a4
> Merge: ac36771 f9213a5
> Author: Pete Zaitcev <zaitcev at>
> Date:   Wed Aug 7 12:14:15 2013 -0600
>     Merge branch 'f19' of ssh:// into  
> f19
> Thought I was careful about them, but apparently not enough. So, does
> anyone have a script that can be attached to git hooks, reliably detects
> an attempt to push merge nodes, then bails the push?

The problem isn't the push, it's the merge.

When doing a merge, always merge with the --ff-only flag.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <>

More information about the devel mailing list