Jags
Jags's Blog

Follow

Jags's Blog

Follow
Searching your Git logs

Photo by Bohdan Stocek on Unsplash

Searching your Git logs

Using Multi-Line Command Function in .zshrc to search git logs

Jags's photo
Jags
·Jan 6, 2023·

1 min read

Play this article

Add the following function to your .zshrc file & then source ~/.zshrc
This search is case insensitive

function gsearch(){ 
git log -3 -i --grep="$1" --pretty=format:'%h %s [%an]'
}

Usage :

gsearch wip
 
Share this