Skip to content

Instantly share code, notes, and snippets.

@MichaelLeonffu
Created March 23, 2017 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MichaelLeonffu/d044543c83d89eeb1e2e97fb9bb1e72a to your computer and use it in GitHub Desktop.
Save MichaelLeonffu/d044543c83d89eeb1e2e97fb9bb1e72a to your computer and use it in GitHub Desktop.
This will auto commit in a simple way
#!/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