Cómo empujar a dos distancias github a la vez

Read this article in:

Para los fines de la copia de seguridad y la resiliencia, puede ser útil mantener dos mandos git idénticos para un repo. Tal vez uno está en github, y otro está en una máquina en otra nube. Entonces, usted puede querer automatizar empujando cada cambio a los dos repos inmediatamente.

git remote set-url --push origin git@github.com: Utilizausername
git remote set-url --add --push origin git@git:/home/git/repos/
git push origin

Empuja a múltiples distancias. Agregue el servidor Git hospedado como un remoto:

git remote add git git@git:/home/git/repos/jamserver.git

Establecer múltiples URL de empuje para Github y el servidor:

git remote set-url --push origin git@github.com:/.git 
git remote set-url --add --push origin git@git:/home/git/repos/.git

Verificar URL de empuje:

git remote get-url --all --push origin

Empuje a ambos mandos:

git push origin

o a un remoto específico:

git push git

¡Eso es!

.^.

marlyn mondoe beautiful
Please login to post comments: