Jeremy Kun on Nostr: TIL this git command searches the history of a repo for a string (including the first ...
TIL this git command searches the history of a repo for a string (including the first commit that introduced the string)
git log -S <search string> --source --all
Useful for finding the origin of an error message that has moved around the codebase. h/t
https://stackoverflow.com/a/5816177/438830Published at
2025-02-03 23:13:57 UTCEvent JSON
{
"id": "b4a2d2f35045a4fa680dc45ff6f83f40adce7f192a72029af3f343571c7a189a",
"pubkey": "0e75ee63225c8994e77136c3773e99d514f7b52fb8c6cd3ebaab34e39a4b4310",
"created_at": 1738624437,
"kind": 1,
"tags": [
[
"proxy",
"https://mathstodon.xyz/users/j2kun/statuses/113942491158883582",
"activitypub"
]
],
"content": "TIL this git command searches the history of a repo for a string (including the first commit that introduced the string)\n\ngit log -S \u003csearch string\u003e --source --all\n\nUseful for finding the origin of an error message that has moved around the codebase. h/t https://stackoverflow.com/a/5816177/438830",
"sig": "c9236690fe7b69442df176f9d4c46ce728cfc69fe27a7975954be3f2a8de88317ad8fcd4269aabff4f0d7d5a1a349eb408ab87d74d0bff8a61a3c3e7b24b7031"
}