I'm planning a sequence of lessons for how to build a web app using a demo app and building it from the ground up.
I would like to use git for 1) a repo of the demonstration app's code, and 2) have the git commit log help guide students.
Each lesson is a small step in building the web app. I'd like each lesson to correspond to a single git commit, where the student can see exactly what code changed in the lesson by viewing the lesson's commit on GitHub.
What I'm not sure of is how to do this and make it maintainable so the commit history is always in sequence of the lessons. Or is there an alternative technique commonly used to do this that I'm unaware of (such as using branches/tags/patches)? My main concerns are:
- Making corrections and updates to lessons/commits and ensuring these changes appear throughout the subsequent commits
- Updating dependencies such as 3rd-party JavaScript libraries in any of the commits
- Keeping the commit history in order, so that each commit is equal to one lesson and it appears in sequence. If the first commit/lesson is updated much later after it was originally committed, then it should still be the first entry in the commit log.
Guidance, suggestions, feedback, and improvements are all welcome, thanks in advance!