# Creates a new git repository in $1, adds a new remote named $2 and fetches
# the master on $3. If the git repository already exists a new remote $2 for
# $3 is added. If the remote already exists nothing happens.
# Creates a new git repository in $1, adds a new remote named $2 and fetches
# the master on $3. If the git repository already exists a new remote $2 for
# $3 is added. If the remote already exists nothing happens.
echo "Adding remote '$2' to '$1'."
git remote add -t master "$2" "$3/$1"
git fetch "$2" > /dev/null
echo "Adding remote '$2' to '$1'."
git remote add -t master "$2" "$3/$1"
git fetch "$2" > /dev/null
# Pushing to the remote pushes only the master branch in remotes named
# the hostname of this machine. This makes it easy to see where
# changes came from.
# Pushing to the remote pushes only the master branch in remotes named
# the hostname of this machine. This makes it easy to see where
# changes came from.
done
# Create git repository if necessary and/or additional remotes and fetch them.
elif [ "$#" -ge "2" ]; then
done
# Create git repository if necessary and/or additional remotes and fetch them.
elif [ "$#" -ge "2" ]; then