Skip to content

Instantly share code, notes, and snippets.

@joshcanhelp
Last active June 6, 2018 17:36
Embed
What would you like to do?
Copy git repo tags to an svn directory
#!/bin/sh
# Change "grep ^3." to filter by a different major (or remove)
# Change "~/Sites/wp-svn" to the correct path to your local svn repo
# Change rsync excludes, if needed
# Run this in a git repo with tags
for f in $(git tag -l | grep ^3.); do git checkout tags/"$f"; rsync -rv --exclude .git --exclude vendor ./ ~/Sites/wp-svn/tags/"$f"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment