summaryrefslogtreecommitdiff
path: root/commit.d/99git-push
diff options
context:
space:
mode:
Diffstat (limited to 'commit.d/99git-push')
-rwxr-xr-xcommit.d/99git-push10
1 files changed, 10 insertions, 0 deletions
diff --git a/commit.d/99git-push b/commit.d/99git-push
new file mode 100755
index 0000000..0c3cdd1
--- /dev/null
+++ b/commit.d/99git-push
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+
+if [ "$VCS" = git ] && [ -d .git ] && [ -n "$PUSH_REMOTE" ]; then
+ if git config --get remote.$PUSH_REMOTE.url; then
+ git push $PUSH_REMOTE master
+ else
+ echo "etckeeper warning: Configured remote '$PUSH_REMOTE' is unknown to git"
+ fi
+fi