73 ms·
Using Git Grep
- euank 13y agoI personally use the silver searcher[0], also known as ag, which is .gitignore aware and I find quite quick and useful. In fact, ag references git-grep in its readme while this blogpost makes no mention of ag. I suspect the author just doesn't know about ag or doesn't want to install an additional less-standard package... I personally find it worth the installation. [0]: https://github.com/ggreer/the_silver_searcher https://github.com/ggreer/the_silver_searcher
- malandrew 13y agoThere's also an .agignore file which can be in your project folder or in your home directory for systemwide ignores.
- davidgerard 13y agoYep, just came here to note ag. ag is fantastic and I have it installed everywhere I might need to grep a tree that's not in git. (ag's author notes that git grep is usually faster, if you're lucky enough to in fact be grepping a git repo.)
- justinmk 13y ago> I suspect the author just doesn't know about ag Actually, the author uses Windows, and ag is a pain to build on Windows. pt[1] (written in go) has drop-in builds for Windows, Mac, and Linux. [1] https://github.com/monochromegane/the_platinum_searcher https://github.com/monochromegane/the_platinum_searcher
- ggreer 13y agoThe main reason for poor windows support is that I didn't own a copy of windows until two months ago. There is a windows fork of ag, but it doesn't compile on *nix: https://github.com/kjk/the_silver_searcher https://github.com/kjk/the_silver_searcher That said, pt is pretty cool. If that's what works for you, keep using it.
- pmelendez 13y agoThanks for that... I am a big fan of ag at work but I had trouble making it work on cygwin at home. This should solve that problem :)
- js2 13y agoThis post was written in Aug 2011. I believe ag wasn't publicly released till Dec 2011. http://geoff.greer.fm/2011/12/27/the-silver-searcher-better-than-ack/ http://geoff.greer.fm/2011/12/27/the-silver-searcher-better-...
- unwind 13y agoIt took me a while to understand that the article's use of "frew" simply was a random placeholder search string. I started looking up those characters in the docs, and becoming annoyed since it made no sense. :) Also, shameless plug: my Gitbrowser plug-in for the Geany editor/IDE support git grep, and makes the search results clickable in the editor (https://github.com/unwind/gitbrowser https://github.com/unwind/gitbrowser).
- deleted 13y ago[deleted]
- james-skemp 13y ago2nd gen Nexus 7 doesn't like the SSL cert and removing HTTPS redirects back to that version. In case the author is reading these comments, that's unfortunate. (Chrome for Android, should be current.)
- omh 13y agoIt looks like the server is slightly misconfigured, it isn't serving the required intermediate certificate[1]. Desktop browsers are smart enough to find the intermediate certificate and then verify the chain, but technically I don't think this is part of the spec. [1] https://www.ssllabs.com/ssltest/analyze.html?d=blog.afoolishmanifesto.com&hideResults=on https://www.ssllabs.com/ssltest/analyze.html?d=blog.afoolish...
- frioux 13y agoSorry about that! I'll fix it when I get a chance
- frioux 13y agok, it's fixed now.
- adamors 13y agoGit grep also integrates nicely into Vim with Fugitive. It shows the results exactly like :vimgrep.
- badman_ting 13y agoI found out about it maybe six weeks ago and have been using it ever since, pretty much every day. Extremely useful.
- hyp0 13y agogit grep can be used outside a git repo (git 1.7.8): --no-index
- notfoss 13y agoI was confused after reading your comment, as I initially ran "git grep" in my $HOME and it worked fine. Then I remembered that my $HOME is managed using git! Indeed, it doesn't work in a non git directory without the switch. Thanks for pointing it out.
- barrkel 13y agoI invoke git grep with helm-git-grep inside Emacs. Almost instantaneous incremental search across the whole repo.