Skip to content

Instantly share code, notes, and snippets.

@caugner
Created September 17, 2025 08:39
Show Gist options
  • Select an option

  • Save caugner/c66ceb32d38552acd81a3fc01c26074b to your computer and use it in GitHub Desktop.

Select an option

Save caugner/c66ceb32d38552acd81a3fc01c26074b to your computer and use it in GitHub Desktop.
git-bisect-search
git-bisect-search() {
if [ -z "$1" ]; then
echo "Usage: $0 <pattern>"
return 1
fi
local pattern="$1"
git bisect start
git bisect bad HEAD
git bisect good "$(git rev-list --max-parents=0 HEAD)"
git bisect run sh -c "! rg -uu -n -q \"$pattern\""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment