A question from a beginner: there are several ways to search in git history. To me, it is not clear what, the difference between the commands really is:
git logsearches in the commit messages?
Yes. Options -S/-G search for commits that change the number of occurence (i.e., add or remove) mentioned text. --grep searches through entire commit messages.
git grepseems to search everywhere: in files, blobs, trees and commit objects?
No, only in files (that is, blobs).