m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2026-09-17 10:07:20 +0200
committerMarcin Chrzanowski <m@m-chrzan.xyz>2026-09-17 10:07:20 +0200
commite875845f511d04d7ff9d41ddf767233953ebaf46 (patch)
tree0a5d3d246da2877558e2196cb98108a10fffba73
parent1729d6eef367ba8e24edb69ccba703db515fe073 (diff)
Add git searching
-rw-r--r--git.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/git.md b/git.md
index 34d814f..a935060 100644
--- a/git.md
+++ b/git.md
@@ -36,3 +36,14 @@ directory of just the code, not a repo:
Change remote url:
git remote set-url <remote> <new url>
+
+## git log
+
+Find commits that added or removed a particular string (specifically, where the
+number of occurences changed):
+
+ git log -S <pattern>
+
+Find commits that contain the given pattern in the diff:
+
+ git log -G <pattern>