Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Sync the ~/git/ocaml.git repository with the master Subversion repository at Inria and upload the changes to GitHub at bmeurer/ocaml.
#!/bin/sh
# ~/bin/ocaml-git-sync.sh: Sync the ~/git/ocaml.git repository with the master
# Subversion repository at Inria and upload the changes
# to GitHub at bmeurer/ocaml.
# Copyright (c) 2011 Benedikt Meurer <benedikt.meurer@googlemail.com>
#
# Repository location
GIT_DIR="$HOME/git/ocaml.git"
export GIT_DIR
# Update with latest changes from Subversion
git --bare svn fetch --all --no-checkout --quiet || exit $?
# Update local tracking branches
for branch in `git --bare branch -r | grep -v github`; do
git --bare branch -f -t "$branch" "remotes/$branch" > /dev/null
done
# Minify!
git --bare repack -A -d -q || exit $?
git --bare gc -q || exit $?
# Push to GitHub
git --bare push -q github 'refs/heads/*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.