From 5e0d3562ae6762925ab05eb6881a4780d3243db0 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 26 Jul 2012 16:09:49 +0200 Subject: add post-receive hook for pushing the repo to the next server --- post-receive.push-forward | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 post-receive.push-forward diff --git a/post-receive.push-forward b/post-receive.push-forward new file mode 100755 index 0000000..56800ed --- /dev/null +++ b/post-receive.push-forward @@ -0,0 +1,10 @@ +#! /bin/bash +while read old new ref ; do + BRANCH="${ref#refs/heads/}" + + if [ "${new}" = "0000000000000000000000000000000000000000" ]; then + git push --force vm-staticweb ":${BRANCH}" + else + git push --force vm-staticweb "${BRANCH}" + fi +done -- cgit v1.2.3-1-g7c22