git log --all --pretty=oneline --follow -- path/to/file.cc
# -I: ignore binary
# -F: fixed string
# -G: basic regex
git rev-list --all | while read revision; do git grep -I -F 'def run_in_parallel' ':(exclude)*.pdf'; done
git log --all --pretty=oneline --follow -- path/to/file.cc
# -I: ignore binary
# -F: fixed string
# -G: basic regex
git rev-list --all | while read revision; do git grep -I -F 'def run_in_parallel' ':(exclude)*.pdf'; done