Skip to content

Instantly share code, notes, and snippets.

hola.rb queda así:
nombre = ARGV.first || "Mundo"
puts "Hola, #{nombre}!"
git add hola.rb
git commit -m "Ups, no queríamos este commit"
git revert HEAD --no-edit
[main 8b71812]
git log --oneline
git tag v1
bash
git checkout v1^ # o v1~1
cat hello.rb
hello.rb
cat hello.rb.
bash
hello.rb
nombre = ARGV.first || "Mundo"
puts "Hola, #{nombre}!"
ruby hello.rb Ana
bash
git add hello.rb
git init):
cd work/hola
💎 2. Editar el archivo hello.rb
Abre el archivo hello.rb en tu editor y reemplaza su contenido con:
puts "Hola, #{ARGV.first}!"