summaryrefslogtreecommitdiff
path: root/scripts/git-clone-my
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/git-clone-my')
-rwxr-xr-xscripts/git-clone-my17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/git-clone-my b/scripts/git-clone-my
new file mode 100755
index 0000000..86238cd
--- /dev/null
+++ b/scripts/git-clone-my
@@ -0,0 +1,17 @@
1#!/bin/sh
2
3# Clone one of my git repositories and setup multiple remote
4# Usage: git-clone-my REPO
5
6pull_remote="git@tronto.net:"
7push="git@tronto.net git@github.com:sebastianotronto/"
8
9if [ -z "$1" ]; then
10 echo "git-clone-my: please specify a valid repository"
11fi
12
13git clone "$pull_remote"$1.git || exit 1
14cd $1
15for repo in $push; do
16 git remote set-url --push --add origin "$repo"$1.git
17done

Generated with cgit - Back to sebastiano.tronto.net