Skip to content

Instantly share code, notes, and snippets.

@llaumgui
Created January 10, 2014 15:04
Show Gist options
  • Save llaumgui/8355885 to your computer and use it in GitHub Desktop.
Save llaumgui/8355885 to your computer and use it in GitHub Desktop.
Miror git repositories with Github.
#!/bin/bash
#
# Miror git repositories with Github.
# To work you must declare a remote called "github"
#
GITHUB_MIRROR="bla blabla etc"
GIT_REPOSITORIES=/home/git/repositories
for repo in ${GITHUB_MIRROR}; do
echo "${GIT_REPOSITORIES}/${repo}.git";
cd ${GIT_REPOSITORIES}/${repo}.git;
git push github
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment