oh-my-git icon indicating copy to clipboard operation
oh-my-git copied to clipboard

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

Open T-X opened this issue 1 year ago • 4 comments

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.

T-X avatar Sep 05 '23 15:09 T-X

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.

AceTheFace avatar Dec 01 '23 11:12 AceTheFace

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

divyesh-vartha avatar Apr 14 '24 03:04 divyesh-vartha

🫢 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?

CodeAsm avatar Apr 15 '24 07:04 CodeAsm

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...

defini-tiv avatar May 07 '24 09:05 defini-tiv