Skip to content

Instantly share code, notes, and snippets.

@dkavanagh
Last active July 15, 2016 15:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dkavanagh/5161125 to your computer and use it in GitHub Desktop.
Save dkavanagh/5161125 to your computer and use it in GitHub Desktop.
pushtoremote.sh - I revised this to work with the current branch because I never ended up passing in anything other than that.
branch=`git rev-parse --abbrev-ref HEAD`
if [ "$branch" = "master" ] || [ "$branch" = "maint-4.1" ]
then
echo "Pushing to "$branch" is no bueno."
exit -1
fi
echo "pushing to "$branch
git submodule foreach git push origin $branch
git push origin $branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment