Skip to content

Instantly share code, notes, and snippets.

@nandub
Created October 31, 2009 07:27
Show Gist options
  • Save nandub/222969 to your computer and use it in GitHub Desktop.
Save nandub/222969 to your computer and use it in GitHub Desktop.
git add commit push
#!/bin/bash
export MESSAGE=$1
export BRANCH=$2
if [ "$MESSAGE" == "" ]
then
echo "Usage $0 commit-message"
exit 1
fi
export MESSAGE="${MESSAGE}"
git commit -a -m $MESSAGE
if [ "$BRANCH" != "" ]
then
export BRANCH=origin" "${BRANCH}
git push ${BRANCH}
else
git push
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment