Joined April 2018
·

dblando

tech support and tech writer at OP5 Software
·
Tulsa, OK
·
·
·

Posted to Git status on all repos in folder over 1 year ago

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/'.
Achievements
1 Karma
0 Total ProTip Views