git autopush shell script
script bash para hacer un commit de un repositorio GIT de manera automatizada
- añadir a cron para ejecución automatizada.
- hay que configurar el remote:
- git config credential.helper ← no he hecho funcionar o no aporta
- origin https:<user>:<pass>@<url>
- certificado SSH? ← debería funcionar
#!/bin/bash cd <git_directory> [[ -z "$(git status --porcelain)" ]] || { git add . git commit -m "$(date +%Y-%m-%d)" git push origin master }