Last active
January 19, 2022 15:55
-
-
Save renkin/c814a5a68c183488b6c3a48defd43c63 to your computer and use it in GitHub Desktop.
This script greps for a branch name in all relevant repos.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script greps for a branch name in all relevant repos. | |
# | |
# Usage: grep_branchname_in_git_repos.sh <branch name> | |
# E.g.: grep_branchname_in_git_repos.sh 8.2.2 | |
# | |
RELEVANT_REPOS=( repo1 repo2 ) | |
# base directory, where all repositories are located | |
BASE_DIR="/c/Dev/FP" | |
BRANCH_NAME="$1" | |
for repo in "${RELEVANT_REPOS[@]}" | |
do | |
echo "" | |
echo "Repo '$repo'" | |
echo "====================" | |
cd "$BASE_DIR/$repo" | |
git fe | |
git ba | grep $BRANCH_NAME | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment