Skip to content

Instantly share code, notes, and snippets.

@humanerrorprocessor
Created December 10, 2015 02:33
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 humanerrorprocessor/4d29b44f24b874d99984 to your computer and use it in GitHub Desktop.
Save humanerrorprocessor/4d29b44f24b874d99984 to your computer and use it in GitHub Desktop.
Update WordPress Plugin from GitHub, Syncing to WordPress.org Repository
# Get earliest commit on WordPress repo
svn log -r 1:HEAD --limit 1 https://plugins.trac.wordpress.org/log/plugin-name
# Clone a git repo from WordPress
git svn clone -s -r599654 --no-minimize-url --prefix=origin/ http://plugins.svn.wordpress.org/plugin-name/
cd plugin-name
git svn fetch
git svn rebase
# Add GitHub remote repo
git remote add origin git@github.com:user/plugin-name.git
git push origin master
# After editing files
git add --all
git commit -am "Edited files"
git tag v2.0.0
git push -u origin master --tags
# Push to WordPress repo, it may take long
git svn rebase
git svn dcommit
# Tagging new release if necessary
git svn tag "2.0.0"
# Need to edit files again on git repo? rebase first
git rebase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment