Forrest logo
back to context overview

git-grep

List of commands for git-grep:

  • git-grep:tldr:03d61 git-grep: Search for a string in tracked files, including submodules.
    $ git grep --recurse-submodules ${search_string}
    try on your machine
    explain this command
  • git-grep:tldr:3fa38 git-grep: Search for a string across all branches.
    $ git grep ${search_string} $(git rev-list --all)
    try on your machine
    explain this command
  • git-grep:tldr:7b110 git-grep: Search for a string in tracked files.
    $ git grep ${search_string}
    try on your machine
    explain this command
  • git-grep:tldr:cb2eb git-grep: Search for a string at a specific point in history.
    $ git grep ${search_string} ${HEAD~2}
    try on your machine
    explain this command
back to context overview