Created
October 31, 2009 07:27
-
-
Save nandub/222969 to your computer and use it in GitHub Desktop.
git add commit push
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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