commit 49d7c2e706c41c21b16b1b41521cd9288dc28d52 parent 37c0762a51d6ef2c2d859d779839aeb5257a8d7d Author: Sebastiano Tronto <sebastiano@tronto.net> Date: Thu, 14 May 2026 09:44:24 +0200 Added git clone script Diffstat:
| A | scripts/git-clone-my | | | 17 | +++++++++++++++++ |
1 file changed, 17 insertions(+), 0 deletions(-)
diff --git a/scripts/git-clone-my b/scripts/git-clone-my @@ -0,0 +1,17 @@ +#!/bin/sh + +# Clone one of my git repositories and setup multiple remote +# Usage: git-clone-my REPO + +pull_remote="git@tronto.net:" +push="git@tronto.net git@github.com:sebastianotronto/" + +if [ -z "$1" ]; then + echo "git-clone-my: please specify a valid repository" +fi + +git clone "$pull_remote"$1.git || exit 1 +cd $1 +for repo in $push; do + git remote set-url --push --add origin "$repo"$1.git +done