git-learning-game / oh-my-git

An interactive Git learning game!
https://ohmygit.org
Other
1.98k stars 143 forks source link

Level "Branches grow with you": Not accepting changes to "birthday" branch? #184

Open T-X opened 11 months ago

T-X commented 11 months ago

Hi,

On Debian Sid I tried to solve the "Branches grow with you" level as follows:

$ git checkout birthday
$ echo "You handover the present" >> you
$ git commit -a -m "Give present"
$ git checkout concert
$ echo "You dance at the concert" >> you
$ git commit -a -m "Dance at the concert"

However only the second but not the first win condition turns green. The condition "Travel directly to the last yellow commit of the birthday timeline, make a change to 'you', and make a commit" stays red.

I'm using the precompiled v0.6.5 for Linux.

AceTheFace commented 9 months ago

You did not follow precisely the instructions. You have to checkout the last commit and not only switch to the branch. Technically it's the same - for the game mechanics it's a difference.

divyesh-vartha commented 4 months ago

Technically it's the same

Actually its not the same technically too.

See here: https://stackoverflow.com/questions/57123031/git-checkout-commit-hash-vs-git-checkout-branch

CodeAsm commented 4 months ago

🫢 Owww, instead of checkout branch, we checkout the actual commit the branch now points to. getting detached heads warnings. this is so naughty. What are we learning here? could this be done with less detached heads?

defini-tiv commented 3 months ago

well its useful to learn that the Branch doesn't "move with you" if you checked out a commit instead of a branch. That's what this lesson is about...