Skip to content

Instantly share code, notes, and snippets.

@MartyLake
Created October 26, 2014 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartyLake/8e54064eed6fc2cd01c8 to your computer and use it in GitHub Desktop.
Save MartyLake/8e54064eed6fc2cd01c8 to your computer and use it in GitHub Desktop.
git tools
#!/bin/sh
#
# Automaticaly push every commit but not branch
BRANCH_NAME=$(git branch | grep '*' | sed 's/* //')
if [ $BRANCH_NAME != '(no branch)' ] && [ $BRANCH_NAME != 'master' ]
then
# your regularly scheduled hook
exec git push
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment