watch (command)

The command runs other commands or jobs repeatedly in N time intervals

Git: auto-commit all changes every 15 mins

watch -n 900 "git pull origin main && (git ls-files --modified --others --exclude-standard | grep . > /dev/null) && { git add . ; git commit -m 'auto-commit' ; git push origin main; }"

Subscribe to the newsletter

Get a once-per-week email with my latest content. By subscribing to this newsletter you will also be the first to receive last updates of my eBooks and courses.

0 members

Comments 💬