NaN
Back to commands
Category: Git
Last updated:
Git log search

Two ways to search history commits, depend on what you remember.

By commit message

git log --grep="variables" --oneline

Only commits whose message match the word: Git Log Grep

By code change

git log -S "variables" --oneline -- src/
  • -S : find commits that added or removed the string
  • -- src/ : limit to a path

Find the commit that introduce or remove the code: Git Log Pickaxe

add -p to see the diff too.

See you again ^_^

This content is licensed under CC BY 4.0 .| Edit this page