Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
を使用して特定の文字列を検索したいのですが、探している文字列が特定の人によって変更されたことを知るために、git grepを使用して結果をフィルタリングしたいと思います。git blame
git grep
git blame
それらをどのように組み合わせて、必要な結果を得ることができるかわかりません。
ご協力ありがとうございました。
これを実現するための小さなシェル スクリプトを記述できます。
git rev-list --author=Doe HEAD | while read rev; do if git show -p $rev | grep "PATTERN" >/dev/null; then echo $rev fi done
これは、「Doe」の作成者を持ち、コミット内容に「PATTERN」を持つ、HEAD によって到達可能な SHA を出力します。