Created
March 23, 2017 15:08
-
-
Save MichaelLeonffu/d044543c83d89eeb1e2e97fb9bb1e72a to your computer and use it in GitHub Desktop.
This will auto commit in a simple way
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
#!/bin/bash | |
#Github atuomation: Fetch, Pull, Add, Commit, and Push. | |
#By Michael Leonffu 2017 | |
git fetch | |
git pull | |
git add . | |
printf 'Message to commit with: \n' | |
read commitMessage | |
printf '\nAre you sure?\n\n' | |
read -n1 -p '(y/n)' messageConfirmation | |
printf '\n' | |
if ( [[ "$messageConfirmation" = 'y' ]] );then | |
git commit -m "$commitMessage" | |
git push | |
printf '\nSuccess!?' | |
else | |
printf '\nConformation Failed, Exiting' | |
fi | |
printf '\n\033[93m Have a Nice Day!\033[0m\n' | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment