Searching commits across repos for particular text

Searching commits across repos for particular text

. 2 min read

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!


Tags

AWS Analytics Antifragile Apache Spark Apple Apps Arbitrage Automation Awesome BBMP Bangalore Black Swan Bonds Boonex Bootstrap Brokerage Charges CFPB CMS CSS Calypso Camelot Capital Markets Charts Chirp Choropleth Chrome Code Igniter Collections Containerization Converters Cycling DalalBeat Data Analytics Data Journalism Data Mining Data Munging Data Privacy Data Science Databases Debt Design Design Stock DesignStock Diet Django Docker Document Processing Dropbox Electron Electronics Entertainment Entrepreneurship Exercise FFMPEG Facebook Finance Fire TV Stick Fitness Forerunner From-The-News Fun Futures Gaana Garmin General Geocoding Getting Started Ghost Google APIs GraphicsMagick HHVM HTTPS Hackathon Hacks Hardware Health House Keeping Housing IBM BlueMix IBrokers IPinfo Ideas Image Conversion Image Processing Infographics Interactive Brokers Internet Investing IoT Legal Lets Encrypt Mac Machine Learning Mailbox app Mapbox Markdown Marketing Meteor Mockups MongoDB Mortgages Movies Music MyPad MySQL Nativefier Nature Netflix Newsletters Nginx Node.js Notes OCR OSX Open Source OpenCPU Options PDF PHP Pebble Peloton Personal Photography Picture Platforms Plex Portable Apps Productivity Property Tax PyroCMS Quantitative Finance R-Project Random Raspberry Pi Research Resources Reticulate Robot S3 SQLite STT Scraping Security Server Shell Shiny Side Project Sikuli Speech Recognition Spider Pro Spinning Spotify Startup Resources Startups Strategy Sublime Text System Monitoring Tax Terminal Tips To Do Tools Torrent Trading Trends Troubleshooting USElection2016 Ubuntu Unix Valuations Video Conversion Visualization Wagtail Wearables Weekend Fun WhatsApp Wordpress anaconda annie bash catalina cv2 daily coding dailycoding data.table debugging devtools downloader e-Signatures ggplot git go google maps hat-tip iOS iPad iPhone iTunes javascript jupyter logging macos numpy opencv optionality plotly python rstats videos youtube