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
More on Commits, branches and tags
How do you write a good commit message?BeginnerWhat is the difference between `git add .`, `git add -A` and `git add -u`?BeginnerHow do you commit only part of the changes in a file?BeginnerHow do you change the last commit message or add a forgotten file?BeginnerWhat is the difference between `git switch`, `git restore` and `git checkout`?BeginnerWhat is the difference between lightweight and annotated tags?Beginner