#!/bin/bash if [ "$2" == "" ]; then echo usage: mkgit-client [repository name] [git user]@[server] exit fi git remote rm origin git remote add origin $2:$1 git push --set-upstream origin master git push --set-upstream origin main BRANCHES=$(git branch | sed "s/*//g") for BRANCH in ${BRANCHES[@]}; do git branch $BRANCH --set-upstream-to origin/$BRANCH done