eficode-academy / git-katas

A set of exercises for deliberate Git Practice
MIT License
1.32k stars 860 forks source link

Improve the git reset exercise #298

Open Zleep-Dogg opened 3 years ago

Zleep-Dogg commented 3 years ago

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

JKrag commented 3 years ago

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.

  1. Run git add 10.txt to add this file back again.
  2. 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 commented 3 years ago

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 commented 2 years ago

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

sofusalbertsen commented 1 year ago

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