Skip to content

Instantly share code, notes, and snippets.

@andreacioni
Created July 30, 2018 14:49
Show Gist options
  • Save andreacioni/0963dbfa3f581dad1ee5426566ec297a to your computer and use it in GitHub Desktop.
Save andreacioni/0963dbfa3f581dad1ee5426566ec297a to your computer and use it in GitHub Desktop.
Simple script to rewiew & save your work when using GIT
#!/bin/bash
git add .
git status
echo "Hit return to continue..."
read
echo "Insert commit message:"
read MESSAGE
git commit -m $MESSAGE
while true; do
git config credential.helper 'cache --timeout=1440'
git pull
git push
if [ $? -eq 0 ]; then
break
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment