:e ~/article/the-git-auto-pull-push-script.md [readonly]

smjrifle@smjrifle.xyz:~/article/ $

The Git Auto Pull Push Script

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 master

Add to crontab for automated execution:

crontab -e
# Add this line for running every hour
0 * * * * /path/to/gitauto.sh
[:bp] Black Arch [:bn] Delete All Customers and Products in Magento
-- NORMAL -- the-git-auto-pull-push-script.md PHP UTF-8 0% smjrifle@xyz