Note to self on updating Wordpress plugins via git-svn
I host my Two Factor Auth Wordpress Plugin on Github and I run git svn locally to be able to sync the Github git repo with the Wordpress plugins SVN repo.
But, it’s a bit of a hassle and I don’t update the plugin often enough to remember what step to take.
The assumption is that you’ve followed this guide to setup you local repo with svn and git remotes.
1
Write code in local git feature branches as usual. Push the finished code to Githubs master branch and add a git tag.
2
Create a new local git branch (or use a clean old one) and merge local master branch (remember to squash all commits!) into this one. It has to have a straight history.
3
Run git svn rebase
the see that the history matches with the remote Worpress svn repo.
4
Run git svn dcommit --username yourusername
to push the code to Wordpress svn repo. Remember that you have to change all the tags in your readme.txt and you main plugin file to match the new release version.
5
Run git svn tag x.x
to copy trunk and create a new remote tag/release from it.