Diferències
Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.
| Ambdós costats versió prèvia Revisió prèvia Següent revisió | Revisió prèvia | ||
| tech:git:autopush [24/07/2020 04:56] – 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 | script bash para hacer un commit de un repositorio GIT de manera automatizada | ||
| Línia 5: | Línia 6: | ||
| * hay que configurar el remote: | * hay que configurar el remote: | ||
| * git config credential.helper <- no he hecho funcionar o no aporta | * git config credential.helper <- no he hecho funcionar o no aporta | ||
| - | * origin https://< | + | * origin https:%%//%%< |
| * certificado SSH? <- debería funcionar | * certificado SSH? <- debería funcionar | ||
| <code bash> | <code bash> | ||
| - | #!/bin/bash | + | #!/usr/bin/env bash |
| cd < | cd < | ||
| Línia 15: | 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 | ||
| } | } | ||
| + | |||
| </ | </ | ||