Last active
August 29, 2015 14:15
-
-
Save djvs/10c47eb229930f2396c7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
push(){ | |
git config remote.origin.url >& /dev/null | |
if [ $? -eq 0 ]; then | |
if [ $# -eq 0 ]; then | |
echo "you need to give a commit message! example: \n push \"my message\"" ; return | |
fi | |
git add -A :/; | |
git commit -a -m $1; | |
git push origin $(git branch | sed -n -e 's/^\* \(\.*\)/\1/p' ); | |
else | |
echo "you're not in a git repo!" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment