diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-10-15 16:18:19 -0400 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-10-15 16:18:19 -0400 |
commit | a78560944934d7728ae8d2949a5201487c0e4867 (patch) | |
tree | d035c1158bf39de04c7ed4e2e45744f6b2effde0 /init | |
parent | 794e1951e4817c812d5d1897b43df92b91fbd581 (diff) |
add hooks to clones
Diffstat (limited to 'init')
-rwxr-xr-x | init | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -5,6 +5,8 @@ if [ $# -ne 1 ]; then exit 1 fi +set -xe + base_dir="$HOME" new_repo="${base_dir}/$1" @@ -24,3 +26,6 @@ fi mkdir "$new_repo" git init --bare "$new_repo" >/dev/null 2>&1\ && echo "Initialized empty Git repository: git@$(uname -n):$1" + +echo 'git push github -f --mirror' > "$new_repo/hooks/post-receive" +chmod +x "$new_repo/hooks/post-receive" |