This is a Windows Batch script to check all git repositories in the subfolders and show all of their status. It also warns when there are not any git repositories in top-level subfolders.
TL;DR Get the code here:
https://gist.github.com/innocenat/4e46ef32b31da48e420757a6d54e80e0
The code is pretty simple — it recurses down a directory trying to find a Git repository, and when it finds one, it runs git status
. I usually run it in the evening on my work computer to see if there is anything I haven’t committed.
It also shows if any top-level subdirectory doesn’t contain any Git repositories at all. I use this on my personal computer where I might have forgotten about some side project, so I don’t forget to back them up somewhere.
Note
I used to have all my coding projects on Dropbox, but with huge node_modules, venv, or even .git folders, it made syncing a real pain on a new device.
At some point in the past I have >1,000,000 files on my Dropbox, and 80% of them are part of those folders. So I know I need to change.