Skip to content

Instantly share code, notes, and snippets.

View akien-mga's full-sized avatar

Rémi Verschelde akien-mga

View GitHub Profile
@akien-mga
akien-mga / gist:6892064ad5acb8a2aa65a655e16845a1
Created August 27, 2017 16:08 — forked from lonnen/gist:3101795
git grep and git blame. two great tastes that taste great together
# from i8ramin - http://getintothis.com/blog/2012/04/02/git-grep-and-blame-bash-function/
# runs git grep on a pattern, and then uses git blame to who did it
ggb() {
git grep -n $1 | while IFS=: read i j k; do git blame -L $j,$j $i | cat; done
}
# small modification for git egrep bash
geb() {
git grep -E -n $1 | while IFS=: read i j k; do git blame -L $j,$j $i | cat; done
}