From 88b60140d60554f45e35f8979e2832b96aed6cd7 Mon Sep 17 00:00:00 2001 From: Mohammad-Ali Minaie Date: Fri, 2 Nov 2018 22:06:16 -0400 Subject: [PATCH] updating master with new script --- push.sh | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/push.sh b/push.sh index 36349805..947cad6b 100755 --- a/push.sh +++ b/push.sh @@ -2,11 +2,25 @@ clear git status -git add --all :/ -IFS= read -r -p "Enter commit message: " com -git commit -m "${com}" +#git add --all :/ +#IFS= read -r -p "Enter commit message: " com +#git commit -m "${com}" #echo $(git branch) git branch -IFS= read -r -p "Enter Branch name: " com1 -git push nmd ${com1} -git push github ${com1} +gitBranch=$(git symbolic-ref --short HEAD) + +read -p "Is this the correct branch (y/n)?" CONT +if [ "$CONT" = "y" ]; then + + git add --all :/ + IFS= read -r -p "Enter commit message: " com + git commit -m "${com}" + git push nmd ${gitBranch} + git push github ${gitBranch} +else + echo "Please switch to the correct branch to continue" +fi + + +#git push nmd ${com1} +#git push github ${com1}