The backup part of that is that you are sending a copy of your code to a separate server (github).
It has nothing to do with git. Making a copy on a separate server would still be a backup even if you weren't using git. Using git without pushing your repo somewhere else would not be a backup.
It was a fake post anyway, but the instructions were to remove the output of that library and code using it, not delete everything on the computer or project.