Diferències
Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.
| Següent revisió | Revisió prèvia | ||
| tech:git:autopush [24/07/2020 04:43] – creat mate | tech:git:autopush [04/05/2026 07:01] (actual) – mate | ||
|---|---|---|---|
| Línia 1: | Línia 1: | ||
| = git autopush shell script | = git autopush shell script | ||
| + | {{tag> | ||
| + | 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: | ||
| + | * certificado SSH? <- debería funcionar | ||
| + | |||
| <code bash> | <code bash> | ||
| - | #!/bin/bash | + | #!/usr/bin/env bash |
| cd < | cd < | ||
| Línia 7: | Línia 16: | ||
| [[ -z "$(git status --porcelain)" | [[ -z "$(git status --porcelain)" | ||
| git add . | git add . | ||
| - | git commit -m " | + | |
| + | | ||
| + | |||
| + | # | ||
| + | git commit -m " | ||
| git push origin master | git push origin master | ||
| } | } | ||
| + | |||
| </ | </ | ||