From ba3adb2c2c5bf5da57dcf509fcbffc3de0497fd9 Mon Sep 17 00:00:00 2001 From: Banana Date: Sat, 21 Mar 2020 18:35:20 +0100 Subject: [PATCH] git example to search in multiple repos at once --- git/git-search-multiple-repos.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 git/git-search-multiple-repos.sh diff --git a/git/git-search-multiple-repos.sh b/git/git-search-multiple-repos.sh new file mode 100644 index 0000000..03081a7 --- /dev/null +++ b/git/git-search-multiple-repos.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# copywrite by Johannes 'Banana' Keßler 2020 + +# this example show how to search multiple repos in the current +# directory. Use this to create your own command and search. + +for d in */; do + git -C "$d" --no-pager rev-list --all | xargs git -C "$d" --no-pager grep -l SEARCHTERM >> search.log; +done; \ No newline at end of file -- 2.39.5