Skip to content

Instantly share code, notes, and snippets.

@mrkaspa
Last active August 29, 2015 14:24
Show Gist options
  • Save mrkaspa/1066efecc8bfa5a10e3e to your computer and use it in GitHub Desktop.
Save mrkaspa/1066efecc8bfa5a10e3e to your computer and use it in GitHub Desktop.
No more large commits
#!/bin/bash
ARGSI="${#}"
if [ $ARGSI == "1" ]; then
git add -A && git commit -m "$1" && git push origin master
else
if [ $ARGSI == "2" ]; then
git add -A && git commit -m "$1" && git push origin $2
else
if [ $ARGSI == "3" ]; then
git add -A && git commit -m "$1" && git push $2 $3
else
echo "You have to pass 1, 2 or 3 arguments"
fi
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment