If you're like me you have a dir like ~/Workspace/Github
where all your git repos live. I often find myself making a change in a repo, getting side tracked and ending up in another repo, or off doing something else all together. After a while I end up with several repos with modifications. This script helps me pick up where I left off by checking the status of all my repos, instead of having to check each one individually.
Usage:
git-status [directory]
This will run git status
on each repo under the directory specified. If called with no directory provided it will default to the current directory.
Great script thanks for sharing!
I decided to alter the "if" statement which checks/fixes path to an elif statement to stop a local error on Ubuntu.
The script runs fine, but without this alteration it showed a small console error about syntax on line 12 regarding double brackets. I am not a shell expert, but I like using scripts when possible to save time. This modification works without error. Saves me time updating large projects. My version of the script has some added logic exclusive for my projects, thanks again.
Here's my mod: https://gist.github.com/shopglobal/0b7a46613f2335f150de855e717396ca/revisions
Original (if):
Modified (elif):