Last active
November 7, 2016 05:21
-
-
Save Hemant-Mann/90feae8b24a74ba21d61 to your computer and use it in GitHub Desktop.
Just enter the message for commit and it will commit to master
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 | |
if [[ ! -d .git ]]; then | |
echo "Fatal error: not a git repository" | |
exit 1 | |
fi | |
if [[ $# < 1 ]]; then | |
git status | |
exit 1 | |
fi | |
git add --all | |
git commit -m "$1" | |
output=$(git remote -v) | |
if [[ $output ]]; then | |
git push -u origin master | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment