File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ echo -e "${BCyan}# Git Push Script #${RESET_COLOR}"
54
54
echo -e " ${BCyan} #############################${RESET_COLOR} "
55
55
56
56
# get branch name (e.g master, main, etc... ) #
57
- Branch=$( git branch --show-current)
57
+ Branch=$( git branch --show-current)
58
+ DEFAULT_COMMIT_MSG=$( git status -s)
58
59
59
60
echo -e " \n${BRed} [*] Your Current Branch : ${BYellow}${Branch}${RESET_COLOR} "
60
61
@@ -69,20 +70,19 @@ echo -e "\n${BPurple}[+] Adding new changes to the repo... \n${RESET_COLOR}"
69
70
git add --all .
70
71
71
72
if [ " $1 " == " -m" ];
72
- then
73
- # commit changes#
74
- echo " "
75
- git commit -m " $2 "
73
+
74
+ then
75
+
76
+ # commit changes#
77
+ echo " "
78
+ git commit -m " $2 "
79
+
76
80
else
77
- # read commit comment from user #
78
- echo " "
79
- echo -e " ${BPurple} ##################################${RESET_COLOR} "
80
- echo -e " ${BPurple} # Write your commit comment! :- #${RESET_COLOR} "
81
- read yourCommit
82
81
83
- # commit changes #
82
+ # use the default commit msg #
84
83
echo " "
85
- git commit -m " $yourCommit "
84
+ git commit -m " updated/added ${DEFAULT_COMMIT_MSG} "
85
+
86
86
fi
87
87
88
88
# push to repo #
You can’t perform that action at this time.
0 commit comments