Created
February 1, 2011 17:21
-
-
Save rduplain/806194 to your computer and use it in GitHub Desktop.
Mirror a GitHub project to a local filesystem.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # usage: mirror-github <account_name> <project_name> | |
| git clone --mirror [email protected]:${1}/${2}.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Run in a directory with *.git repository directories. | |
| for repo in *.git; do | |
| pushd $repo | |
| git fetch | |
| popd > /dev/null | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment