Find commits that added or removed specific text
git log -S pickaxe search | when was this function removed | which commit added this code | search git history for text | git | log | searchgit log -S 'define('WP_DEBUG'' --oneline --allLists all commits in all branches where the number of occurrences of the search text changed, meaning places where it was added or removed. Ideal for finding out when a function, an API key or a setting was introduced or deleted. Adding -p also shows the matching diff.
Note: Pure moves within a file are not found. For regular expressions, use -G instead of -S.
Also searched as
- git log -S pickaxe search
- when was this function removed
- which commit added this code
- search git history for text