ImperialCollegeLondon / intermediate_grad_school_git_course

Intermediate Git and GitHub for Effective Collaboration
https://imperialcollegelondon.github.io/intermediate_grad_school_git_course/
Other
3 stars 1 forks source link

Teach students to use `git revert` before `git reset --hard` #80

Closed alexdewar closed 1 month ago

alexdewar commented 1 month ago

Currently in the "rewriting history" episode we teach students the git reset command before git revert, which seems a strange way to do it. Maybe let's teach them the safe way to do things first.

AdrianDAlessandro commented 1 month ago

Maybe address #24 at the same time

alexdewar commented 1 month ago

Note that this will change the output of git log etc. everywhere after this, so various code boxes will need updating:

alexdewar commented 1 month ago

I've been working my way through the course to build up the git history again and noticed that we already have a revert in there from the introductory course! So if students have done the intro course they should already know how to use git revert.

Would it be worth just signposting the relevant section in the intro course? I see two upsides:

  1. Reverting commits doesn't involve rewriting history so it arguably doesn't belong in this episode anyway
  2. We were thinking about dropping some content to leave longer for the collaboration exercise at the end

Thoughts?

alexdewar commented 1 month ago

Superseded by #91