all repos — dotfiles @ 18e1d649416cd7eb75c56215cf6b044eeeadcbdc

my *nix dotfiles

bin/git-new-push-remote (view raw)

 1#!/bin/sh
 2# git new-push-remote: adds a new push-only remote to a repository
 3# without removing the existing push remote.
 4
 5[[ "$@" == "" ]] && {
 6    printf '%s\n' "usage: git new-push-remote <remote url>"
 7    exit
 8}
 9
10old_push_remote="$(git remote -v | grep '(push)' | awk '{print $2}')"
11git remote set-url "$(git remote show)" --add --push "$1"
12git remote set-url "$(git remote show)" --add --push "$old_push_remote"