Working with git is a huge plus point, it’s easier to track, merge and revert changes. But if you are lazy like me and have to do repetitive git operations, here is an automation script.
Create a file called gitauto.sh:
#!/bin/bash
cd /path/to/your/repo
git add -A
git commit -m "Auto commit $(date)"
git pull origin master
git push origin masterAdd to crontab for automated execution:
crontab -e
# Add this line for running every hour
0 * * * * /path/to/gitauto.sh