config

My configuration files and custom scripts.
git clone https://git.tronto.net/config
Download | Log | Files | Refs

git-clone-my (395B)


      1 #!/bin/sh
      2 
      3 # Clone one of my git repositories and setup multiple remote
      4 # Usage: git-clone-my REPO
      5 
      6 pull_remote="git@tronto.net:"
      7 push="git@tronto.net git@github.com:sebastianotronto/"
      8 
      9 if [ -z "$1" ]; then
     10 	echo "git-clone-my: please specify a valid repository"
     11 fi
     12 
     13 git clone "$pull_remote"$1.git || exit 1
     14 cd $1
     15 for repo in $push; do
     16 	git remote set-url --push --add origin "$repo"$1.git
     17 done