summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-shell-commands/mirror11
1 files changed, 11 insertions, 0 deletions
diff --git a/git-shell-commands/mirror b/git-shell-commands/mirror
new file mode 100755
index 0000000..2bf9a49
--- /dev/null
+++ b/git-shell-commands/mirror
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Mirrors a repository
+# ssh git@host mirror git://url/repo.git
+
+set -E
+
+repo="`basename "$1"`.git"
+
+git clone --mirror $1 $repo
+
+exit $?