I use many git-repositories to organize my work (>30), all of which are organized below a single root. (I do not use modules and I don't want to.)
My question is whether anybody could provide a simple script that goes through all subfolders recursively (some are git repositories others are not) to find out whether pulling would bring some changes. I.e., I do not want the script to do these pulls, I just want a list of folders (containing a git repository) that I could pull. (Obviously one "can" always pull; what I mean is that the remote repository has changes that were not pulled yet.) I believe that 'somehow' git fetch could provide this information, but I didn't figure out how since it seems that even executing it twice brings different results. And obviously I want my script to always lead to the same output as long as I don't pull any of its repositories, e.g., also when I execute it twice in a row.
(FYI, a related question was asked and answered here), but there they do actually want to execute those pulls, which I do not; I want to do this by hand in case there are conflicts etc.; I really just want the list.
Just FYI: The dual (complement) to this question is how to find/identify repositories in which I have local (rather than remote) changes. You find it here.