From 31e48345f66cb388bda038f5057c3917b7db511c Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Mon, 28 Sep 2015 16:33:15 -0400 Subject: [PATCH] Remove githooks/pre-push. We now have server-side protection against force pushes to master, which was the original motivation for this hook. The hook prevents the use of `git push myfork -f --all` as a way to backup all branches. --- githooks/pre-push | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100755 githooks/pre-push diff --git a/githooks/pre-push b/githooks/pre-push deleted file mode 100755 index 4fe4db8a89b2..000000000000 --- a/githooks/pre-push +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -# Disallow pushes that include both master and any other branch. -# This is intended to prevent accidental force-push to master -# with git versions prior to 2.0 (which is what ships with OSX), -# when "git push -f origin" without specifying a branch would -# try to force-push all branches. -# Individual pushes to the master branch (even force pushes) -# are still allowed as long as only the master branch is pushed. - -awk ' -$3 == "refs/heads/master" { has_master = 1 } -END { - if (NR > 1 && has_master) { - print "cannot push to master and another branch at the same time" - exit 1 - } -} -'