Show Menu
Cheatography

Git Search (WIP) Cheat Sheet (DRAFT) by

Ever tried to search for stuff in git but suck at it(me too)? Here's your cheatsheet!

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Git Grep - Where a term existed

git grep <st­rin­g>
OPTIONS
-n
show line number
-p
show what method­/fu­nction matches string
--break --heading
make output more readable
 

git log - When a term existed

git log -S<­str­ing> <fi­len­ame>
show commits where string existed
OPTIONS
--one-line
show each commit in one line