Created
May 8, 2019 19:23
-
-
Save themsaid/0ae2b5d87607460b3cb9bedece9e35bf to your computer and use it in GitHub Desktop.
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
function pushme { | |
br=`git branch | grep "*"` | |
git add --all | |
if (($# > 1)); then | |
params='' | |
for i in $*; | |
do | |
params=" $params $i" | |
done | |
git commit -m "$params" | |
else | |
git commit -m "$1" | |
fi | |
if git push origin ${br/* /} | |
then | |
echo "success" | |
else | |
osascript -e 'tell app "System Events" to display dialog "PUSH FAILED!"' | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice, i think I will adapt this for me