How can I prevent non-fastforward pushes to selected branch(es) in git?
Here’s an update hook (copy to hooks/update) that I wrote for my own use. This script by default denies all non-fast-forward updates but allows them for explicitly configured branches. It should be easy enough to invert it so that non-fast-forward updates are allowed for all but the master branch. #!/bin/sh # # A hook script … Read more