Interview Prep/Git & GitHub/Commits, branches and tags

What do `git blame` and `git log -S` / `-G` answer?

BeginnerConceptCommits, branches and tags
Answer

git blame shows who last changed each line. git log -S'text' (pickaxe) finds commits where the number of occurrences of a string changed, and -G'regex' finds commits whose diff matches a regex. git log -L follows a function or line range through history.

git blame -w -C -L 40,60 app.py
git log -S'MAX_RETRIES' --oneline
git log -L :parse_config:config.py
All Git & GitHub questions Roadmap: Git & GitHub

More on Commits, branches and tags