48
28
I have a set of repositories sorted into directories based on their VCS (Git, Mercurial, SVN). With Subversion I was able to run svn update *
in the parent directory and it would loop through each directory and update each repository as expected. That's not the case for Git or Mercurial.
I would like to come up with a bash script that I can run to do exactly that, loop through directories and either git pull
or hg pull
in each. I just don't have much bash scripting experience.
It could be clarified whether you want the commands executed recursively (in all subfolders), where mj41's answer is the only one I've tried (from here and at other SO sites) that does that. – r_alex_hall – 2019-11-08T01:48:46.213
>