Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the git reset exercise #298

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Zleep-Dogg
Copy link

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

Copy link
Contributor

@JKrag JKrag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My initial thought is that this is actually a valuable addition to the exercise, and illustrates a quite important point.
The only reason that I am reluctant to immediately approve this, is that the reset exercise is such a cornerstone of our training, and I at least usually run through it on the whiteboard, so I think I will want to do a test-run in front of a live audience before I commit.

@JKrag
Copy link
Contributor

JKrag commented Mar 10, 2021

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
Copy link
Contributor

JKrag commented Mar 10, 2021

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
Copy link
Contributor

JKrag commented Nov 23, 2021

@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 JKrag marked this pull request as draft October 24, 2022 22:11
@sofusalbertsen
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants