Skip to content

Instantly share code, notes, and snippets.

@phamngsinh
Last active June 2, 2016 11:45
Show Gist options
  • Select an option

  • Save phamngsinh/ae49f402c9471a1c98ef7ed167b8e9f3 to your computer and use it in GitHub Desktop.

Select an option

Save phamngsinh/ae49f402c9471a1c98ef7ed167b8e9f3 to your computer and use it in GitHub Desktop.
Search all of Git history for a string?
git rev-list --all | (
while read revision; do
git grep -F 'password' $revision
done
)
====
git rev-list --all | GIT_PAGER=cat xargs git grep 'search_string'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment