oh-my-git
oh-my-git copied to clipboard
Level "Branches grow with you": Not accepting changes to "birthday" branch?
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.
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.
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
🫢 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?
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...