diff options
author | Andreas Fankhauser hiddenalpha.ch | 2024-09-16 23:23:51 +0200 |
---|---|---|
committer | Andreas Fankhauser hiddenalpha.ch | 2024-09-16 23:23:51 +0200 |
commit | 138a8b10a2133f4d6763d04f58f95fdc601cfd96 (patch) | |
tree | 47e2b993572a0286e5ac2ea2e5375c79e59ea459 /doc | |
parent | ecb15d058747227b6020a363d3daf08aeeae50ec (diff) | |
parent | 527bfde9f3008b7e422c0f5b361f9bebe4e438cc (diff) | |
download | UnspecifiedGarbage-138a8b10a2133f4d6763d04f58f95fdc601cfd96.zip UnspecifiedGarbage-138a8b10a2133f4d6763d04f58f95fdc601cfd96.tar.gz |
Merge remote-tracking branch 'gh-hiddenalpha/master'
Diffstat (limited to 'doc')
-rw-r--r-- | doc/note/git/git.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/note/git/git.txt b/doc/note/git/git.txt index d0325a1..2dcf2a1 100644 --- a/doc/note/git/git.txt +++ b/doc/note/git/git.txt @@ -38,6 +38,19 @@ twice with colon in between): git log --follow -- path/to/file +## History search for file contents + +Commit message contains: git log --grep foo + + git log -S foo File contents "foo" (literal) num occur has changed: + git log --pickaxe-regex foo File contents "foo" (regex) num occur has changed: + git log -G foo Diff contains "foo" (regex): + +For "-G" add "--patch" to get diff in place of ref. + +[src](https://stackoverflow.com/a/1340245/4415884) + + ## Auto-destroy code-format && REMOTENAME=upstream \ |