projects
/
le_isp_update.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b56b412
)
Add git hooks for sync remote
master
author
sgf
<sgf.dma@gmail.com>
Wed, 12 Apr 2023 14:55:10 +0000
(17:55 +0300)
committer
sgf
<sgf.dma@gmail.com>
Wed, 12 Apr 2023 14:55:10 +0000
(17:55 +0300)
git_hooks/post-commit
[new file with mode: 0755]
patch
|
blob
diff --git a/git_hooks/post-commit
b/git_hooks/post-commit
new file mode 100755
(executable)
index 0000000..
5454b5c
--- /dev/null
+++ b/
git_hooks/post-commit
@@ -0,0
+1,10
@@
+#!/bin/sh
+
+set -euf
+
+remotes="$(git remote)"
+if echo "$remotes" | grep -q 'sync'; then
+ git push --all sync
+else
+ echo ">>>>> No sync remote defined." 1>&2
+fi