The main source of loss for beginners, I think, will not be able to correctly add and fix content. Therefore, you must teach them how to verify that their work has been completed. For example, explain the git commit message:
nothing added to commit, but no traces of files (use "git add" to track)
And show them how to use the git status command, and read its output, and emphasize that they need to make sure that there are no unsaved changes after the commit.
Another potential source of data loss is errors when trying to do fancy things. Probable errors are small typos, forgetting flags and completing the steps of a multi-step task out of order. Therefore, if you taught a programming course and you needed to teach minimal version control, I would say that he should teach only tasks with minimum steps and a minimum of flags:
The main solo workflow, which uses only commit to save work, and revert to roll back offers has virtually no room for errors that lose data. A solo user can probably get away from using only commands, but still gets a fair value due to source control.
git commit -a git revert git status git diff git log
However, since the module is about version control, you probably need to cover more than just a bare minimum. In this case, when considering advanced tasks, you should discuss probable errors in each team (that is, indicate specific possibilities in which probable errors, which I mentioned above, lead to data loss), discuss specific warnings and error messages. Also include a variety of exercises that intentionally destroy data so students can see what they like.
You can also use internal git elements so that students have a proper mental model of how data is stored in git repositories and show some advanced cases of data recovery ( for example ).
Pointing out that version control is not backup (and backups are not version control) seems reasonable.
I would not say avoiding git rebase , or rewriting history is a good rule in general, since they can be very useful features of a version control system, and it seems reasonable to teach them a course on source control.