Skip to content

Instantly share code, notes, and snippets.

@inouire
Last active March 18, 2026 15:37
Show Gist options
  • Select an option

  • Save inouire/7d5c048ba71c11f36bd9f9ac61ae2316 to your computer and use it in GitHub Desktop.

Select an option

Save inouire/7d5c048ba71c11f36bd9f9ac61ae2316 to your computer and use it in GitHub Desktop.

Revisions

  1. inouire revised this gist Mar 18, 2026. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions git_log_grep.md
    Original file line number Diff line number Diff line change
    @@ -9,4 +9,10 @@ or with a regex:

    ```bash
    git log -G "function.*login" --all
    ```

    restore the file

    ```bash
    git checkout <commit_hash>^ -- path/to/file
    ```
  2. inouire created this gist Mar 18, 2026.
    12 changes: 12 additions & 0 deletions git_log_grep.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    Exact match:

    ```bash
    git log -S "ff1c9fbf-c3b8-4da0-aa81-72b50b84f67b" --all
    git show <commit_hash>
    ```

    or with a regex:

    ```bash
    git log -G "function.*login" --all
    ```