Questions Answers
what does add do? Marks a file(or a set of files) as something you want to backup
what does commit do? creates a backup with the given message
If commit makes a backup but not to Github, where did it back up my files? On your own computer
What good is a backup on your own computer? If you want to go back to an old version, you can do that using git using other commands. By storing the backup locally, restoring old backups is very fast and doesn’t require an internet connection.
Why not do add, commit, and push in one command? Sometimes you only want to add a small number of files, so you might call add on only those files before finally doing a commit. And sometimes you want to make commits but don’t want to push, for example because you don’t have internet access or because you’re working on code that is too sensitive to be placed on any internet site.
How do I see the history of old backups and how do I restore them? If you want to see old commits, you can use git log, and you can use git checkout to restore old copies of your code.