diff options
Diffstat (limited to 'git-disable-push')
-rwxr-xr-x | git-disable-push | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/git-disable-push b/git-disable-push new file mode 100755 index 0000000..2f9e05c --- /dev/null +++ b/git-disable-push @@ -0,0 +1,17 @@ +#!/bin/bash +# +# Disable push to a given remote +# See http://stackoverflow.com/questions/10260311/git-how-to-disable-push?answertab=active#tab-top + +# Parameters +BASENAME="`basename $0`" +REMOTE="$1" + +# Check +if [ -z "$REMOTE" ]; then + echo "usage: $BASENAME <remote>" + exit 1 +fi + +# Run +git remote set-url --push $REMOTE no_push |