Skip to main content

Command Palette

Search for a command to run...

Searching your Git logs

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

Published
1 min read
Searching your Git logs
J

I am Senior Test Automation Engineer, who is interested in Open Source & Quality at scale.

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

Using Git Better

Part 1 of 5

In this series, I will show how to setup and use Git better. By engaging with my posts, you'll elevate your Git proficiency to a new level.

Up next

Enhance Your Git Skills: Mastering Cleanup and Cherry-Picking

Streamline Your Repository and Pick Your Commits Wisely