mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-06-01 19:19:31 +02:00
47 lines
No EOL
1.1 KiB
Text
47 lines
No EOL
1.1 KiB
Text
título = Amigo
|
|
tarjetas = tirar empujar confirmar-pago automático
|
|
|
|
[descripción]
|
|
|
|
¡Tu amigo agregó otra línea a tu ensayo! ¡Consíguelo, agrega un tercero y envíaselo!
|
|
|
|
¡Túrnense hasta tener cinco líneas!
|
|
|
|
[configura el tuyo]
|
|
|
|
echo "Línea 1" > ensayo
|
|
git agregar.
|
|
git commit -m "Una línea"
|
|
|
|
git push -u amigo principal
|
|
|
|
[amigo de configuración]
|
|
|
|
git pago principal
|
|
echo "Línea 2, gnihihi" >> ensayo
|
|
git commit -am "Otra línea"
|
|
|
|
[acciones amigo]
|
|
|
|
si prueba "$(git log --oneline | wc -l)" -eq 3; entonces
|
|
git reset --hard main # Necesario porque el directorio de trabajo no se actualiza cuando enviamos al amigo.
|
|
echo "Línea 4, Blubbblubb" >> ensayo
|
|
git commit -am "Línea final"
|
|
pista "¡Qué bien, agregué una cuarta línea!"
|
|
fi
|
|
|
|
[ganar]
|
|
|
|
# Recibí la segunda línea de tu amigo.
|
|
git show HEAD:ensayo | grep gnihihi
|
|
|
|
# Recibí la cuarta línea de tu amigo.
|
|
git show HEAD:ensayo | grep blubbblubb
|
|
|
|
[gana amigo]
|
|
|
|
# El amigo recibió una tercera línea tuya
|
|
prueba "$(git show HEAD:ensayo | wc -l)" -ge 3
|
|
|
|
# El amigo recibió una quinta línea tuya
|
|
prueba "$(git show HEAD:ensayo | wc -l)" -ge 5 |