all repos — dotfiles @ 2b8cb35ba891840bc7ca59880eddb7ea1706a79b

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"