Created
June 19, 2019 04:51
-
-
Save arn-ob/74124bf07a761390f1bfac910bb51f8f to your computer and use it in GitHub Desktop.
Simple Git Push/Pull Script. For Linux Terminal
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
#!/bin/bash | |
echo "Git Push/Pull Script.....############" | |
echo "" | |
echo "1. Git Push" | |
echo "2. Git Pull" | |
echo "3. Git Pull/Push with Select Link and Branch" | |
echo "4. Exit" | |
read -p "Choose [Enter Number]: " d | |
echo "" | |
echo "You Enter " $d | |
echo "" | |
case $d in | |
1) | |
echo "Git Push Process" | |
git add . | |
read -p "Enter Commit Message: " cmt | |
git commit -m "$cmt" | |
git push origin development | |
echo "git push origin development" | |
echo "" | |
;; | |
2) | |
echo "Git Pull Process" | |
echo "Pull Form Origin Development" | |
git pull origin development | |
echo "Wanted to restart Server" | |
echo "1. Yes" | |
echo "2. No/Skip" | |
read -p "Choose [Enter Number]: " e | |
case $e in | |
1) | |
echo "Server Restart Script" | |
echo "Currently No Script" | |
;; | |
2) | |
echo "Server Will Not Restart" | |
;; | |
esac | |
echo "" | |
;; | |
3) | |
echo "Git Manual Pull/Push" | |
echo "" | |
echo "1. Git Push" | |
echo "2. Git Pull" | |
read -p "Choose [Enter Number]: " s | |
case $s in | |
1) | |
echo "Git Manual Push Process" | |
git add . | |
read -p "Enter Commit Message: " cmt | |
read -p "Enter Link(origin): " lnk | |
read -p "Enter Branch(master): " bnch | |
git commit -m "$cmt" | |
git push $lnk $bnch | |
echo "git push $lnk $bnch" | |
echo "" | |
;; | |
2) | |
echo "Git Manual Pull Process" | |
read -p "Enter Link(origin): " lnk | |
read -p "Enter Branch(master): " bnch | |
git pull $lnk $bnch | |
echo "git pull $lnk $bnch" | |
echo "" | |
;; | |
esac | |
echo "Closing" | |
echo "" | |
;; | |
4) | |
echo "Closing" | |
echo "" | |
;; | |
esac | |
echo "Thank You!" | |
echo "stupid@arnob" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment