Skip to content

Instantly share code, notes, and snippets.

@rinatkhaziev
Created October 22, 2012 19:37
Show Gist options
  • Save rinatkhaziev/3933584 to your computer and use it in GitHub Desktop.
Save rinatkhaziev/3933584 to your computer and use it in GitHub Desktop.
Easily sync updates from a git repo to a svn repo
#/bin/bash
#use it like this: git-to-svn.sh /path/to/git/repo /path/to/svn/trunk
if [ -z "$1" ]; then
printf "\033[31;40mYou haven\'t specified the path to copy from\n"
printf "\033[00m"
fi
if [ -z "$2" ]; then
printf "\033[31;40mYou haven\'t specified the path to copy to\n"
printf "\033[00m"
exit
fi
rsync -avz --exclude=.git* --exclude=*.phptidy-cache --exclude=.DS_Store ${1%/}/ ${2%/}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment