From ebb15ef25584adaac7ad64043b0cedfece684423 Mon Sep 17 00:00:00 2001 From: sgf Date: Tue, 7 Dec 2021 18:22:47 +0300 Subject: [PATCH] Add sync git hooks. --- day1a/git_hooks/post-commit | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 day1a/git_hooks/post-commit diff --git a/day1a/git_hooks/post-commit b/day1a/git_hooks/post-commit new file mode 100755 index 0000000..f5002cd --- /dev/null +++ b/day1a/git_hooks/post-commit @@ -0,0 +1,11 @@ +#!/bin/sh + +set -euf + +remotes="$(git remote)" +if echo "$remotes" | grep -q 'sync'; then + git push --all sync + git push --tags sync +else + echo ">>>>> No sync remote defined." 1>&2 +fi -- 2.20.1