Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.18 KB

README.md

File metadata and controls

33 lines (24 loc) · 1.18 KB

grug

Grep Recursive Utility for Git

Simple script to search through the main branches of all of your git repositories locally using git grep.
It will periodically run git fetch before searching to ensure results are (kinda) up to date.

Shout out to everyone who can't afford GitLab Enterprise Edition 💀

Installation

# Clone repo and navigate to script dir
git clone https://github.com/Kornelijus/grug.git
cd grug/bin

# Add script to your PATH
# bash
echo "export PATH=\$PATH:$(pwd)" >> ~/.bashrc
source ~/.bashrc

# zsh
echo "export PATH=\$PATH:$(pwd)" >> ~/.zshrc
source ~/.zshrc

Configuration

Environment Variable Description Default Value
GRUG_ROOT Path to directory where your git repositories are located. Current directory
GRUG_DEFAULT_BRANCH Default branch to search through. master
GRUG_FETCH_INTERVAL_MINS How often git fetch should be run on the main branches. 60