From: Banana Date: Sat, 21 Mar 2020 17:35:20 +0000 (+0100) Subject: git example to search in multiple repos at once X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=ba3adb2c2c5bf5da57dcf509fcbffc3de0497fd9;p=klimbim.git git example to search in multiple repos at once --- 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