Thank you for providing this, as it got me going. I figured out a slightly simpler solution: bash
find $GIT_PARENT_PATH -name .git -execdir git status \;
How this works instead:
The $GIT_PARENT_PATH variable is wherever you hold your Git repositories.
** For example: "~/git/"
-name .git will find any file with the explicit name of '.git'
-execdir is similar to the -exec flag in 'find'. However it will run the following command from the directory that hosts the result.
** Example: if you have '~/git/foo/.git' as a result, then -execdir will run git status from '~/git/foo/'.
Thank you for providing this, as it got me going. I figured out a slightly simpler solution:
bash find $GIT_PARENT_PATH -name .git -execdir git status \;
How this works instead:
$GIT_PARENT_PATH
variable is wherever you hold your Git repositories. ** For example: "~/git/"-name .git
will find any file with the explicit name of '.git'-execdir
is similar to the-exec
flag in 'find'. However it will run the following command from the directory that hosts the result. ** Example: if you have '~/git/foo/.git' as a result, then-execdir
will rungit status
from '~/git/foo/'.