Skip to content

Instantly share code, notes, and snippets.

@mrrcollins
Last active July 4, 2020 18:05
Show Gist options
  • Save mrrcollins/c026594134feb5b9bc05ae3139a1dd47 to your computer and use it in GitHub Desktop.
Save mrrcollins/c026594134feb5b9bc05ae3139a1dd47 to your computer and use it in GitHub Desktop.
#!/bin/bash
cd ${HOME}/notes
gstatus=`git status --porcelain`
if [ ${#gstatus} -ne 0 ]
then
git add --all
git commit -am "Git Sync `date` on `hostname` $gstatus"
git pull
git push
else
git pull
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment