This commit is contained in:
aleoncavallo 2025-03-25 17:38:55 +01:00 committed by GitHub
commit a301a1ce13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 118 additions and 126 deletions

View file

@ -1,15 +1,15 @@
title = The command line
title = La línea de comandos
cards =
[description]
These playing cards are designed to be easy to use and to remember! We'd suggest sticking to them if you don't have a lot of experience with Git!
¡Estas cartas están diseñadas para ser fáciles de usar y recordar! ¡Te sugeriríamos que te apegues a ellas si no tienes mucha experiencia con Git!
[cli]
But there's another way to interact with Git:
Pero hay otra forma de interactuar con Git:
Try typing `git init` into the black terminal below, and pressing the enter key!
¡Intenta escribir `git init` en la terminal negra de abajo y presiona la tecla Enter!
[setup]
@ -17,11 +17,11 @@ rm -rf .git
[win]
# Initialize the time machine!
# ¡Inicializa la máquina del tiempo!
test -d .git
[congrats]
Cool! Instead of using the playing cards, you can also do everything via the command line!
¡Genial! ¡En lugar de usar las cartas, también puedes hacer todo a través de la línea de comandos!
The command line is pretty powerful! Often, you can use it to solve tasks faster compared to using a graphical interface.
¡La línea de comandos es bastante poderosa! A menudo, puedes usarla para resolver tareas más rápido en comparación con el uso de una interfaz gráfica.

View file

@ -1,33 +1,32 @@
title = Your first commit
title = Tu primer commit
cards = commit-auto
[description]
You can use your time machine to make snapshots of objects around you! Here, let's practice this!
¡Puedes usar tu máquina del tiempo para hacer instantáneas de objetos a tu alrededor! ¡Aquí, practiquemos esto!
(Your teacher pours some water into a glass.)
(La profe Andrea vierte un poco de agua en un vaso.)
[cli]
Again, instead of using the card, you can also type the commands which are printed on it into the black terminal below!
¡De nuevo, en lugar de usar la tarjeta, también puedes escribir los comandos que están impresos en ella en la terminal negra de abajo!
This is totally optional! But this will be a super useful skill in the real world - and it will give you a sparkling golden badge! :)
¡Esto es completamente opcional! Pero esta será una habilidad súper útil en el mundo real, ¡y te dará una insignia dorada brillante! :)
[setup]
echo "The glass is full of water." > glass
echo "El vaso esta lleno de agua." > vaso
[win]
# Make a snapshot of the glass (a "commit")
# Haz una instantánea del vaso (un "commit")
git rev-parse HEAD
# Change the contents of the glass!
! test "$(cat glass)" = "The glass is full of water."
# ¡Cambia el contenido del vaso!
! test "$(cat vaso)" = "El vaso esta lleno de agua."
# And make a second commit!
git rev-parse HEAD^ && ! test "$(git show main:glass)" = "The glass is full of water."
# ¡Y haz un segundo commit!
git rev-parse HEAD^ && ! test "$(git show main)" = "El vaso esta lleno de agua."
[congrats]
¡Bien hecho! Puedes intentar hacer algunos commits adicionales. Cuando te sientas cómodo, haz clic en "Siguiente nivel".
Nice! You can try making some additional commits. When you feel comfortable, click on "Next Level".

View file

@ -1,42 +1,36 @@
title = Making backups
title = Haciendo copias de seguridad
cards =
[description]
This time, you're making a lot of backup copies - you can look at them by clicking on them!
Esta vez, estás haciendo muchas copias de respaldo; ¡puedes verlas haciendo clic en ellas!
[congrats]
Bien, esto más o menos estaría funcionando.
Okay, this kind of works.
Pero estás un poco preocupado de que termines con cientos de copias de este formulario, y será difícil hacer un seguimiento de todas ellas.
But you're a bit worried that you'll end up with hundreds of copies of this form, and it will be hard to keep track of all of them.
Y especialmente al trabajar con otras personas, enviar copias de un lado a otro no parece ideal.
And especially when working with other people, sending copies back and forth doesn't seem ideal.
You can't wait to try these time machines!
¡No puedes esperar para probar estas máquinas del tiempo!
[setup]
rm -rf .git
echo "~ Why I want to learn Git ~
echo "~ Por qué quiero aprender Git ~
(I still need to write this.)" >> form.txt
(Todavía necesito escribir esto.)" >> form.txt
echo "~ Por qué quiero aprender Git ~
echo "~ Why I want to learn Git ~
Para poder deshacer errores" >> form2.txt
- So that I can undo mistakes" >> form2.txt
echo "~ Por qué quiero aprender Git ~
echo "~ Why I want to learn Git ~
- So that I can undo mistakes
- To track my projects over time" >> form2_final.txt
Para poder deshacer errores
Para seguir mis proyectos con el tiempo" >> form2_final.txt
cp form2_final.txt form2_really_final.txt
[win]
# Add another line to form2_really_final.txt!
# Añade otra linea a form2_really_final.txt!
test "$(cat form2_really_final.txt | wc -l )" -ge 5

View file

@ -1,23 +1,23 @@
title = Enter the time machine
title = Entrar en la máquina del tiempo
cards = init
[description]
You've been accepted to time travel school! Yay! It's your first day! Your teacher explains:
¡Has sido aceptado en la escuela de viajes en el tiempo! ¡Yay! ¡Es tu primer día! Tu profesor explica:
"To do anything with a time machine, you first need to initialize it!"
"¡Para hacer cualquier cosa con una máquina del tiempo, primero necesitas inicializarla!"
Drag that blue card up to play it!
¡Arrastra esa tarjeta azul hacia arriba para jugarla!
[setup]
rm -rf .git
[win]
# Inicializa la máquina del tiempo!
# Initialize the time machine!
test -d .git
[congrats]
Nice! See that little owl squirrel that appeared? It will be your companion, and always show you where you are in time!
¡Bien hecho! ¿Ves a esa pequeña ardilla búho que apareció? ¡Será tu compañera y siempre te mostrará dónde estás en el tiempo!

View file

@ -1,25 +1,25 @@
title = Working together
title = Trabajando juntos
cards = pull commit-auto push
[description]
Let's add your name to our list of students!
¡Agreguemos tu nombre a nuestra lista de estudiantes!
I already have a second commit of it in my time machine - let's work together!
Ya tengo un segundo commit en mi máquina del tiempo; ¡trabajemos juntos!
[cli]
To go back to old commands, you can press arrow up and down. That way, you don't have to type in long commands twice.
Para volver a comandos anteriores, puedes presionar las flechas hacia arriba y hacia abajo. De esta manera, no tienes que escribir comandos largos dos veces.
[congrats]
Welcome to time travel school! :) I'll see you for your first class tomorrow!
¡Bienvenido a la escuela de viajes en el tiempo! :) ¡Te veré en tu primera clase mañana!
[setup]
echo "~ List of current students ~" > students
echo "~ Lista de estudiantes actuales ~" > students
git add .
git commit -m "Initial version"
git commit -m "Versión inicial"
git push -u teacher main
git update-ref -d refs/remotes/teacher/main
@ -28,25 +28,26 @@ git update-ref -d refs/remotes/teacher/main
git reset --hard main
echo "
- Sam
- Alex" >> students
echo "
Sam
Alex" >> students
git add .
git commit -m "Added two students"
git commit -m "Añadidos dos estudiantes"
[win]
# Obtén el segundo commit de tu profesora usando git pull.
# Get the second commit from your teacher using `git pull`.
test "$(git log --oneline teacher/main | wc -l)" -ge 2
# Añade tu nombre a la lista de estudiantes
# Add your name to the list of students
test "$(cat students |wc -l)" -ge 5
# Haz commit de tu resultado.
# Commit your result.
test "$(git show main:students |wc -l)" -ge 5
test "$(git show main |wc -l)" -ge 5
[win teacher]
# ¡Y usa git push para enviarlo a tu profesora!
# And use `git push` to send it to your teacher!
test "$(git show main:students |wc -l)" -ge 5
test "$(git show main |wc -l)" -ge 5

View file

@ -1,36 +1,34 @@
title = Living dangerously
title = Viviendo peligrosamente
cards =
[description]
So you have decided to apply for time travel school, to learn how to use this time machine called "Git"!
¡Así que has decidido solicitar la escuela de viajes en el tiempo, para aprender a usar esta máquina del tiempo llamada "Git"!
How exciting!
¡Qué emocionante!
You're almost done with the paperwork! You just need to fill in one more reason why you want to learn Git.
¡Ya casi has terminado con el papeleo! Solo necesitas completar una razón más por la cual quieres aprender Git.
[congrats]
Suddenly, your cat jumps on the table, snatches away the form, and runs away! Oh no. All your hard work, gone!
De repente, tu gato salta sobre la mesa, arrebata el formulario y ¡sale corriendo! Oh no. ¡Todo tu trabajo duro, desaparecido!
You clearly need a better solution.
Claramente necesitas una mejor solución.
(Click "Next Level" as soon as you're ready!)
(¡Haz clic en "Siguiente nivel" tan pronto como estés listo!)
[setup]
rm -rf .git
echo "~ Why I want to learn Git ~
echo "~ Por qué quiero aprender Git ~
- So that I can undo mistakes
- To track my projects over time" >> form.txt
- Para poder deshacer errores
- Para seguir mis proyectos con el tiempo" >> form.txt
[actions]
test "$(cat form.txt | wc -l )" -ge 5 && echo "(Has been stolen by your cat.)
test "$(cat form.txt | wc -l )" -ge 5 && echo "(Ha sido robado por tu gato.)
@ -38,5 +36,5 @@ test "$(cat form.txt | wc -l )" -ge 5 && echo "(Has been stolen by your cat.)
[win]
# Add another line to form.txt!
# ¡Añade otra línea a form.txt!
test "$(cat form.txt | wc -l )" -ge 5

View file

@ -1,38 +1,38 @@
title = Welcome to time travel school!
title = ¡Bienvenido a la escuela de viajes en el tiempo!
cards = config-name commit-auto checkout
[description]
You're still pretty confused by everything that's going on. The next day, you decide to enroll in time travel school!
Sigues bastante confundido por todo lo que está sucediendo. ¡Al día siguiente, decides inscribirte en la escuela de viajes en el tiempo!
Your time travel teacher welcomes you: "Hello there! Wanna tell us your name?"
Tu profesor de viajes en el tiempo te da la bienvenida: "¡Hola! ¿Quieres decirnos tu nombre?"
[setup]
git config --global user.name "You"
echo "~ Why do you want to learn how to use time machines? ~
echo "~ ¿Por qué quieres aprender a usar máquinas del tiempo? ~
[ ] To make sure that my cat doesn't eat my homework.
[ ] So I don't have to keep copies of all my essays.
[ ] To collaborate with other time travel students.
[ ] Other, please specify:" > form
[ ] Para asegurarme de que mi gato no se coma mi tarea.
[ ] Para no tener que guardar copias de todos mis ensayos.
[ ] Para colaborar con otros estudiantes de viajes en el tiempo.
[ ] Otro, por favor especifica:" > form
[actions]
test "$(git config user.name)" != "You" && cat form | grep -v Signature && echo "
Signature: $(git config user.name)" >> form
Firma: $(git config user.name)" >> form
[win]
# Introduce yourself.
# Preséntate.
test "$(git config user.name)" != "You"
# Fill out the enrollment form, and commit it!
# ¡Completa el formulario de inscripción y haz commit!
git show main:form | grep '\[[xX]\]'
[congrats]
"We're so glad to have you!
"¡Estamos encantados de tenerte aquí!
Git can help you fix problems in the past! It allows you to collaborate with other students of time travel! It's really powerful, and it's really popular! I'll see you for your first lesson tomorrow!"
¡Git puede ayudarte a solucionar problemas en el pasado! ¡Te permite colaborar con otros estudiantes de viajes en el tiempo! ¡Es realmente poderoso y muy popular! ¡Te veré para tu primera lección mañana!"

View file

@ -2,181 +2,181 @@
{
"id": "init",
"command": "git init",
"description": "Drag this card into the empty space above to initialize the time machine!"
"description": "¡Arrastra esta tarjeta al espacio vacío de arriba para inicializar la máquina del tiempo!"
},
{
"id": "clone",
"command": "git clone ../[remote] .",
"description": "Create your own copy of someone else's repo."
"description": "Crea tu propia copia del repositorio de otra persona."
},
{
"id": "config-name",
"command": "git config --global user.name [string]",
"description": "Set your name.\n\n(Will not change anything outside of this game.)"
"description": "Establece tu nombre.\n\n(No cambiará nada fuera de este juego.)"
},
{
"id": "config-email",
"command": "git config --global user.email [string]",
"description": "Set your email address."
"description": "Establece tu dirección de correo electrónico."
},
{
"id": "checkout",
"command": "git checkout [commit, ref]",
"description": "Drag this card to a commit or to a branch to travel to it!"
"description": "¡Arrastra esta tarjeta a un commit o a una rama para viajar a ella!"
},
{
"id": "checkout-file",
"command": "git checkout [file]",
"description": "Reset changes in a local file."
"description": "Restablece los cambios en un archivo local."
},
{
"id": "checkout-from",
"command": "git checkout [commit, ref] [file]",
"description": "Get the file contents from the specified commits, and reset both the working directory, as well as the index, to it."
"description": "Obtén el contenido del archivo de los commits especificados y restablece tanto el directorio de trabajo como el índice."
},
{
"id": "commit-a",
"command": "git commit -a",
"description": "Make a new commit, after automatically adding all changes to the index.\nYou'll be asked to enter a short description of what you changed."
"description": "Haz un nuevo commit, después de agregar automáticamente todos los cambios al índice.\nSe te pedirá que ingreses una breve descripción de lo que cambiaste."
},
{
"id": "commit-auto",
"command": "git add .; git commit",
"description": "Make a new commit containing your current environment! Type in a description of what changed!"
"description": "¡Haz un nuevo commit que contenga tu entorno actual! ¡Escribe una descripción de lo que cambió!"
},
{
"id": "merge",
"command": "git merge [commit, ref]",
"description": "Merge the specified timeline into yours. If necessary, will create a merge commit."
"description": "Fusiona la línea de tiempo especificada con la tuya. Si es necesario, se creará un commit de fusión."
},
{
"id": "merge-abort",
"command": "git merge --abort",
"description": "Abort the current merge attempt, and reconstruct the previous state."
"description": "Aborta el intento de fusión actual y reconstruye el estado anterior."
},
{
"id": "rebase",
"command": "git rebase [commit]",
"description": "Put the events in your current timeline on top of the specified one."
"description": "Coloca los eventos de tu línea de tiempo actual sobre la especificada."
},
{
"id": "pull",
"command": "git pull",
"description": "Get someone else's version of the current timeline, and try to merge it into yours."
"description": "Obtén la versión de otra persona de la línea de tiempo actual e intenta fusionarla con la tuya."
},
{
"id": "fetch",
"command": "git fetch [remote]",
"description": "Get a someone else's version of the current timeline."
"description": "Obtén la versión de otra persona de la línea de tiempo actual."
},
{
"id": "push",
"command": "git push",
"description": "Give the current timeline to someone else."
"description": "Dale la línea de tiempo actual a otra persona."
},
{
"id": "rebase-interactive",
"command": "git rebase -i [commit]",
"description": "Make changes to the events in your current timeline, back to the commit you drag this to."
"description": "Realiza cambios en los eventos de tu línea de tiempo actual, hasta el commit al que arrastras esta tarjeta."
},
{
"id": "rebase-continue",
"command": "git rebase --continue",
"description": "Continue the current rebasing process."
"description": "Continúa el proceso de rebase actual."
},
{
"id": "reset-hard",
"command": "git reset --hard [commit]",
"description": "Move the branch you're on to the specified commit."
"description": "Mueve la rama en la que estás al commit especificado."
},
{
"id": "reset",
"command": "git reset [commit]",
"description": "Jump to the commit, and update the index. Keep the current environment."
"description": "Salta al commit y actualiza el índice. Mantén el entorno actual."
},
{
"id": "reset-file",
"command": "git reset [file]",
"description": "Reset the index version of a file to the version in the commit you're on."
"description": "Restablece la versión del índice de un archivo a la versión del commit en el que estás."
},
{
"id": "cherry-pick",
"command": "git cherry-pick [commit]",
"description": "Repeat the specified action on top of your current timeline."
"description": "Repite la acción especificada en tu línea de tiempo actual."
},
{
"id": "revert",
"command": "git revert [commit]",
"description": "Make a new commit that reverts the changes of the specified commit."
"description": "Haz un nuevo commit que revierta los cambios del commit especificado."
},
{
"id": "bisect-start",
"command": "git bisect start",
"description": "Start looking for the commit where things got bad."
"description": "Comienza a buscar el commit donde las cosas se pusieron mal."
},
{
"id": "bisect-good",
"command": "git bisect good",
"description": "State that the current commit is good! When you're automatically transferred, keep playing the `good` and `bad` cards!"
"description": "¡Declara que el commit actual es bueno! Cuando seas transferido automáticamente, sigue jugando las cartas `good` y `bad`."
},
{
"id": "bisect-bad",
"command": "git bisect bad",
"description": "State that the current commit is bad! When you're automatically transferred, keep playing the `good` and `bad` cards!"
"description": "¡Declara que el commit actual es malo! Cuando seas transferido automáticamente, sigue jugando las cartas `good` y `bad`."
},
{
"id": "add",
"command": "git add [file]",
"description": "Update the index version of the file to its current real content."
"description": "Actualiza la versión del índice del archivo a su contenido real actual."
},
{
"id": "rm",
"command": "git rm [file]",
"description": "Delete a file both in the working directory, as well as the index."
"description": "Elimina un archivo tanto en el directorio de trabajo como en el índice."
},
{
"id": "commit",
"command": "git commit",
"description": "Make a commit from the current index."
"description": "Haz un commit desde el índice actual."
},
{
"id": "show",
"command": "git show [commit]",
"description": "Show what changed in the commit."
"description": "Muestra lo que cambió en el commit."
},
{
"id": "branch",
"command": "git branch [string]",
"description": "Create a new branch at your current location."
"description": "Crea una nueva rama en tu ubicación actual."
},
{
"id": "branch-delete",
"command": "git branch -D [ref]",
"description": "Delete a branch."
"description": "Elimina una rama."
},
{
"id": "reflog",
"command": "git reflog [ref, head]",
"description": "Display a log of where the ref pointed to in the past."
"description": "Muestra un registro de dónde apuntó la referencia en el pasado."
},
{
"id": "file-new",
"command": "touch [string]",
"description": "Create a new file."
"description": "Crea un nuevo archivo."
},
{
"id": "file-delete",
"command": "rm [file]",
"description": "Delete a file."
"description": "Elimina un archivo."
},
{
"id": "file-rename",
"command": "mv [file] [string]",
"description": "Rename a file."
"description": "Renombra un archivo."
},
{
"id": "file-copy",
"command": "cp [file] [string]",
"description": "Make a copy of a file."
"description": "Haz una copia de un archivo."
}
]