git-katas icon indicating copy to clipboard operation
git-katas copied to clipboard

Improve the git reset exercise

Open Zleep-Dogg opened this issue 4 years ago • 4 comments

Improve the git reset exercise to show that reset --hard actually removes files added to the staging area

Zleep-Dogg avatar Feb 24 '21 09:02 Zleep-Dogg

I ran the exercise today with these new instructions, and it worked quite well. It does complicate the scenario a bit, but it also teaches more. There was some feedback about point 7 being a bit confusing, and maybe we should split it into 2 separate steps, e.g. 7. Run git add 10.txt to add this file back again. 8. Make an additional change to 10.txt that you don't stage. The file should now show up twice (red & green) in git status

or something like that.

JKrag avatar Mar 10 '21 16:03 JKrag

There is however a slight disadvantage with this mod in general. It directly addresses the fact that 9 & 10 are left untracked after the --mixed reset, and thus ruins a bit of the "😮 oooohh.... that as weird and unexpected" feeling that people have that I really like as a trainer. In a training/classroom situation I really like that "Aha" moment and the opportunities it gives to walk through the exercise on a whiteboard, but as a stand alone exercise for use without a trainer, it might be better without surprises...

JKrag avatar Mar 10 '21 16:03 JKrag

@Zleep-Dogg Sorry. I haven't forgotten about this PR. I am just still on the fence about the change.

We have also been considering somehow adding --keep to the exercise (#284), so maybe the whole thing needs a rethink.

JKrag avatar Nov 23 '21 17:11 JKrag

@JKrag since it's over 2 years from last discussion, should we close this?

sofusalbertsen avatar Sep 06 '23 14:09 sofusalbertsen