Add a Github WordPress plugin to the wordpress.org repository

First. Get approved at wordpress.org.

Once the plugin team approves the plugin, you can get started. This lays out everything using the command line, you can fill in with your GUI of choice as desired.

Change to your plugins new home on your computer locally. This should be an empty directory.

  1. Checkout the repository¬†from .org (must use “https”!). You will need to accept the certificate the first time, (p) for permanently.
    svn co https://plugins.svn.wordpress.org/sewn-in-xml-sitemap .
  2. Change directory to the trunk
    cd trunk
  3. Clone the plugin files from Github
    git clone git@github.com:jupitercow/sewn-in-xml-sitemap.git .
  4. Change back to parent directory
    cd ../
  5. Check the SVN status, you will see git files listed, we need them to not be seen by SVN
    svn status
  6. Add SVN ignores to keep GIT out of your SVN repo on .org, the line break after `.git` is important
    svn propset svn:ignore '.git
    .gitignore
    README.md' trunk
  7. Add `.gitignore` file to keep SVN out of your repo on Github
    *~
    .DS_Store
    .svn
    .cvs
    *.bak
    *.swp
    Thumbs.db
    /.DS_Store
    /.svn
  8. Add everything to the SVN repo
    svn add * --force
  9. Remove things if something went wrong
    svn revert [filename]
  10. Create a tag to get started
    svn copy trunk tags/1.0.4
  11. Commit the SVN where the username and password are from `http://wordpress.org/plugins/`
    svn --username [username] --password [password] commit -m 'initial commit'

Gist

https://gist.github.com/jupitercow/2c20dfc9cd870dde0e0d