Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Refactor 05-history #269
This PR is in fulfillment of the new instructor checkout requirement.
I went to improve the learning objectives in 05-history and ended up refactoring the entire lesson. The content is the same but the emphasis and order of presentation is different. The lesson currently starts with
My refactoring moves the concept of "going back in time" to the very beginning, motivated with the same example used later on ("Oops I over-wrote a file"). It introduces commit IDs and
I welcome comments and feedback! Unfortunately the diff is so big that reading it is a PITA; I re-rendered the HTML and pushed it to my own repo. You can see the new version at
I prefer to split this topic into two: one for exploring the history and the other for undoing mistakes (see #212 and the comment on that).
On the new "Exploring the history" we should mention:
On the new "Undoing mistakes" we should mention:
I usually explain this part by "incrementing the scope" of the mistake, sort of like @bpteague mentions: you first make a mistake, save it but nothing else; then you make the mistake, save and stage, but not commit, and last you go all the way to actually committing your mistake. This plays very well with any story you make up.
@bpteague do you want to redo your PR to make the first part from what you have in here. I can do the "Undoing mistakes" chunk later.
Hi @iglpdc and @rgaiacs - sure, I'll be happy to re-work the PR to address only "exploring history" -- and I like the "incrementing scope" layout for @iglpdc's proposed "undoing mistakes." I'm still left at a bit of a loss for how to motivate "exploring history" -- as a new git user, why should I care? Thoughts?
Because history is what enables undo features. Ask for the students to think about writing a report with never using the undo feature: no undo when copying and past, no undo when remove a section, no undo when remove one file, ...