Skip to content

Commit

Permalink
translate(levels): branches/reorder - Moving branches around
Browse files Browse the repository at this point in the history
  • Loading branch information
d3cryptofc committed Apr 20, 2023
1 parent 29da3d9 commit 73f05de
Showing 1 changed file with 46 additions and 42 deletions.
88 changes: 46 additions & 42 deletions levels/branches/reorder
Original file line number Diff line number Diff line change
@@ -1,89 +1,93 @@
title = Moving branches around
title = Movendo ramificações entre si
cards = checkout commit-auto merge reset-hard

[description]

One of your colleagues messed up here, and put the branches in the wrong timelines!
Um de seus colegas errou aqui e colocou as ramificações nas linhas do tempo erradas!

You could delete and re-create these branches - but you can also directly move them to different commits, by using
Você pode excluir e recriar essas ramificações - mas também pode movê-las diretamente para diferentes commits, usando:

git checkout
git checkout <nome da branch>

on the branch names, and then using
E logo depois usando:

git reset --hard
git reset --hard <commit id>

on the commit where you want the branch to be.
No commit onde você quer que a branch fique.

The donut branch is in the right place, but the timeline is still incomplete - make you actually *eat* the donut in that branch!
A branch 'rosquinha' está no lugar certo, mas a linha do tempo ainda está incompleta - faça você *comer* a rosquinha naquela branch!

[setup]

echo "You do not have a baguette.
echo "Você não tem uma baguete.

You do not have coffee.
Você não tem café.

You do not have a donut." > you
Você não tem uma rosquinha." > voce

git add .
git commit -m "The Beginning"
git commit -m "O começo de tudo."

git checkout -b coffee
echo "You have a baguette.
git checkout -b cafe
echo "Você tem uma baguete.

You do not have coffee.
Você não tem café.

You do not have a donut." > you
Você não tem uma rosquinha." > voce
git add .
git commit -m "You buy a baguette"
git commit -m "Você compra uma baguete."

echo "You ate a baguette.
echo "Você comeu uma baguete.

You do not have coffee.
Você não tem café.

You do not have a donut." > you
Você não tem uma rosquinha." > voce
git add .
git commit -m "You eat the baguette"
git commit -m "Você come a baguete."

git checkout -b baguette main
echo "You do not have a baguette.
git checkout -b baguete main
echo "Você não tem uma baguete.

You have coffee.
Você tem café.

You do not have a donut." > you
Você não tem uma rosquinha." > voce
git add .
git commit -m "You buy some coffee"
git commit -m "Vocẽ compra um café."

echo "You do not have a baguette.
echo "Você não tem uma baguete.

You drank coffee.
Você tomou café.

You do not have a donut." > you
Você não tem uma rosquinha." > voce
git add .
git commit -m "You drink the coffee"
git commit -m "Você toma café."

git checkout -b donut main
echo "You do not have a baguette.
git checkout -b rosquinha main
echo "Você não tem uma baguete.

You do not have coffee.
Você não tem café.

You have a donut." > you
Você tem uma rosquinha." > voce
git add .
git commit -m "You buy a donut"
git commit -m "Você compra uma rosquinha."

git checkout --detach main

[win]

# Did you eat a baguette on the baguette branch?
git show baguette:you | grep "You ate.*baguette"
# Você comeu uma baguete na branch 'baguete'?
git show baguete:voce | grep "Você comeu.*baguete"

# Did you drink a coffee on the coffee branch?
git show coffee:you | grep "You drank.*coffee"
# Você tomou café na branch 'cafe'?
git show cafe:voce | grep "Você tomou.*café"

# Did you eat a donut on the donut branch?
git show donut:you | grep "You ate.*donut"
# Você comeu uma rosquinha na branch 'rosquinha'?
git show rosquinha:voce | grep "Você comeu.*rosquinha"

[actions]

test "$(git rev-parse HEAD^)" = "$(git rev-parse donut)" && hint "Remember to checkout the blue branch tag when you want it to grow with the timeline."
test "$(git rev-parse HEAD^)" = "$(git rev-parse rosquinha)" && hint "Remember to checkout the blue branch tag when you want it to grow with the timeline."

[congrats]

Muito bem! Você conseguiu!

0 comments on commit 73f05de

Please sign in to comment.