irongit

a bin full of cool programs

'easy to push '

huncholanehuncholaneauthored
parent deeb658commit 757e587dbf5b50ee9644c0cc8f8e4ae0db136d5aBrowse files

1 file changed, +9 -1

+9-1bin/gcom
@@ -2,12 +2,20 @@
22 echo -e "\e[38;5;118mAdding and committing all changes\e[0m"
33 git add --all
44 message="$@"
5+push=false
6+
57 if [[ "$message" =~ "-p" ]]; then
68 message=$(echo "$message" | sed 's/-p//g')
7- git push
9+ push=true
810 fi
11+
912 if [[ "$message" =~ "'" ]]; then
1013 git commit -m "$message"
1114 else
1215 git commit -m "'$message'"
16+fi
17+
18+if [[ "$push" == true ]]; then
19+ echo -e "\e[38;5;26mPushing to remote\e[0m"
20+ git push
1321 fi