Will you keep all course materials in a repository? Or just assignments?
Yes and no. I use GitHub Pages to generate a course site written in R Markdown that contains all the course content (e.g. syllabus, notes, slides). This is published and students access it using the standard HTML interface (though they have access to the underlying GitHub repo). Each assignment is distributed in a separate repository.
When will you expect students to commit?
Early and often. If they make a significant change in their code, make a commit. Pushing can be made less frequently but if they do not keep a consistent and frequent log of their changes, they will not be able to look back and easily correct mistakes.
What sort of commit messages should they use?
Informative ones. 1-2 sentences describing what change occurred in the commit.
When do you want your students to push their code to GitHub?
Not as often as commits, but at least once per day. It’s good to push frequently to ensure a remote backup is kept in case of local computer failure (and yes this does happen to students, and yes they are regularly unprepared because they did not push).
Attached is an assignment I accepted from my data viz course I am preparing to teach in the spring.