Skip to content

Instantly share code, notes, and snippets.

@joshcanhelp
Last active June 6, 2018 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshcanhelp/2120f1b7abf5e170fb7d1a001ed73dd8 to your computer and use it in GitHub Desktop.
Save joshcanhelp/2120f1b7abf5e170fb7d1a001ed73dd8 to your computer and use it in GitHub Desktop.
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