Skip to content

Instantly share code, notes, and snippets.

@jeremyfelt
Created July 3, 2018 15:42
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 jeremyfelt/21cc80bc9db53a8c768e8b69010cb687 to your computer and use it in GitHub Desktop.
Save jeremyfelt/21cc80bc9db53a8c768e8b69010cb687 to your computer and use it in GitHub Desktop.
Syncing a WordPress directory into WSUWP
#!/bin/sh
#
# Sync the WordPress tracking repo with that inside WSUWP.
#
rsync --delete -rlgDh --exclude '.git' --exclude 'wp-content/plugins' --exclude 'wp-content/themes' ~/Development/wordpress/ ~/Development/vvv/www/wsuwp/www/wordpress/
@jeremyfelt
Copy link
Author

For the above to work, I have:

  • The WordPress GitHub repository cloned in ~/Development/wordpress/
  • The WSUWP Platform repository cloned in ~/Development/vvv/www/wsuwp/

I fetch the latest tags from WordPress with:

cd ~/Development/wordpress/
git fetch --all
git fetch --tags
git tag
# look for the latest tag and then check it out
git checkout 4.9.6
# sync WP to the platform
bash sync.sh
cd ~/Development/vvv/www/wsuwp/
# git status should now show modified files in WordPress.
git status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment