I've got a folder - 'Repos' - which contains the repos that I'm interested in. These have been cloned from bitbucket, but I guess github could be a source too.
Repos
- music-app
- elephant-site
- node-demo
Is there a git command that I can use which steps thru every folder in Repos and sees if there are new commits on the server, and the download the new stuff? And if there are new commits locally, then upload these.
Try this:
To maintain several repos, you can use git submodule.
Use
git submodule add
to add a repo as a submodule and usegit submodule foreach git pull
to update the repos.This method is like you have a super project, with several git projects in it.
For Windows, this should do it for you via a Command Prompt:
Once you go back to the GitHub client, you should see the updates.
For Windows, I'm using below in .cmd file. It can easily be extended to do something more or something else:
What I have is a scriptlet that does something like:
(Yes, it has a few extra bells and whistles, in that I have a few
hg
repos, and others I manage in git from SVN upstream.)gitfox is a tool to execute command on all subrepo
npm install gitfox -g
g pull