Created
April 23, 2012 10:39
-
-
Save colinux/2470153 to your computer and use it in GitHub Desktop.
git search alias: search for a pattern/keyword in commits history
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.gitconfig: | |
[alias] | |
search = "!f () { git grep -E -n "$1" $(git log --pretty=format:%h -E --pickaxe-regex -G"$1" "$2") -- "./$2"; }; f" | |
# Usage: | |
git search "keyword|regex" <tree> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment