Skip to content

Instantly share code, notes, and snippets.

@oh-sky oh-sky/pre-push.sh
Created Feb 26, 2014

Embed
What would you like to do?
originへのpush時に、originでない別のリモートにもpushするgit hooks
#!/bin/sh
BUCKUPREMOTENAME='AnotherRemoteName'
BRANCHNAME=`git rev-parse --abbrev-ref HEAD`
if test $BUCKUPREMOTENAME != $1 ; then
git push $BUCKUPREMOTENAME $BRANCHNAME
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.