summaryrefslogtreecommitdiff
path: root/scripts/git-clone-my
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2026-05-14 09:44:24 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2026-05-14 09:44:24 +0200
commit49d7c2e706c41c21b16b1b41521cd9288dc28d52 (patch)
tree836d22f7ee5278ed3e2341211039eb84abe30545 /scripts/git-clone-my
parent37c0762a51d6ef2c2d859d779839aeb5257a8d7d (diff)
downloadconfig-49d7c2e706c41c21b16b1b41521cd9288dc28d52.tar.gz
config-49d7c2e706c41c21b16b1b41521cd9288dc28d52.zip
Added git clone script
Diffstat (limited to '')
-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