/ git

Searching commits across repos for particular text

I have this terrible problem of having to search across multiple repos for notes that I have made.

I have developed a fairly good habit of making notes of everything of interest. However, I seem to always forget the repo where I made the note.

It would be good for me to search across repos to find commits that match my search string to recall what I need.

For example, over the past week after many hours of research, I seem to have arrived at potential solution for my note taking app using a CodePen demo, using quilljs and also slate. I am pretty sure I made commits using these particular terms in some .md file. However, recalling that file a week later is such a pain.

I dont have the patience to go through every repo to recall what I have done. This can easily be done using Fakerr/git-recall: An interactive way to peruse your git history from the terminal, or Introduction · Tig - Text-mode interface for Git or rgburke/grv: GRV is a terminal interface for viewing git repositories (My favorite!)

I really need to figure out a more efficient way to parse through the commits in the root directory of interest.

Further google research, led me to finding a feature ON BitBucket to do this!

This is actually pretty useful. I was able to manage this for now using:

codepen ext:md

I still prefer to find a local way of doing this on my terminal or Sublime Text. But, this works for now!

Search code ACROSS repos ON Bitbucket

Actually, come to think about it, I can open ALL my repos in Sublime Text and search through the files with the extension of interest. This may be good enough, but I am worried about the load on my system! Giving it a try now!

Search a TON of repos using Sublime Text

Not too bad actually!!

My gifs wouldn't upload because of a size restriction on my blog. I had to use Gifsicle: Command-Line Animated GIFs as mentioned here.

# Scaling of an image - 50%
gifsicle --scale 0.5 -i animation.gif > animation-smaller.gif

References

There is pretty good help here to search a repo using:

git log --all --oneline --author=rickhanlonii | grep "search query"

However, this searching the commit messages. NOT the commits themselves!