1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/sh -e cd old-repositories for repo in *.git; do if [ x"$repo" = x"gitolite-admin.git" ]; then continue; fi cd $repo if [ $(git branch | wc -l) -ne 0 ]; then gitolite push --mirror "../../repositories/$repo" fi cd .. done