Created
August 15, 2014 02:14
-
-
Save tleen/2d76c5030e3ee9d12619 to your computer and use it in GitHub Desktop.
Notes on mixing git and subversion for wordpress plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Need to use svn to officially host a wordpress plugin, rather be using git+github, so i mix and match. without git-svn: | |
- make your initial plugin in github | |
- issue a release in github | |
- use the .zip download of the release as your initial submission | |
- once approved you get a wordpress svn repo | |
- check out your empty repo: https://wordpress.org/plugins/about/svn/ | |
- copy your plugin files into the /trunk (including your .git/.gitignore) | |
we need to hide git from svn, and hide svn from git | |
- we will be operating git only from the trunk | |
- add .svn to your .gitignore in the svn /trunk | |
- add .git stuff to svn ignore (in your trunk): | |
> svn propedit svn:ignore . | |
http://blog.g14n.info/2013/10/using-git-and-svn-together.html | |
I ignore .git, .gitignore and the README.md (which is for GitHub, the wordpresss plugin uses readme.txt) | |
- do a 'svn stat' to make sure its only seeing the files in trunk/ that you want it to see | |
- svn add [your files in trunk] | |
- svn ci -m "your initial commit message for svn" | |
- if your readme/plugin header does not have a stable version number, put it in there now "1.0.0" | |
- in /trunk make your git release tag (v1.0.0 or whatever) | |
- push that tag to github | |
- copy the trunk files into the subversion /tags directory like some sort of neanderthal | |
http://svnbook.red-bean.com/nightly/en/svn.branchmerge.tags.html | |
> svn copy trunk tags/1.0.0 -m "->1.0.0 release" | |
Wordpress likes plain numbers, github people tend to do v+numbers so thats what I do. v1.0.0 in github, 1.0.0 in svn | |
- for development I link my /trunk under the plugins dir as the plugin so I can work on it and use git, moving only to the svn directory when I want to set new releases to the wordpress svn repo | |
the aim is to use svn as little as possible |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment