Learn grep. If you're familiar with using a shell, it'll be the most immediately useful.
# search current and all child directories for files containing "bananas", case insensitive $ grep -ir "bananas" .
# search current and all child directories for files containing "bananas", case insensitive $ grep -ir "bananas" .
history | grep "git push"
But how do you then pipe that to tail? :D
What you can do is press Ctrl-R again and it will search the older match. There's also forward match but I can't recall the shortcut.
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | headhistory | awk '{print $2}' | sort | uniq -c | sort -rn
2936 git 1166 cd 409 ll 343 ssh 302 l 279 vagrant 223 ls 201 la 151 cat 140 mkdir
https://github.com/junegunn/fzf
It's a fuzzy searcher for Ctrl-r that shows all possible results, updating as you type.