Skip to content

Instantly share code, notes, and snippets.

@dongilbert
Created April 27, 2012 14:27
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dongilbert/2509702 to your computer and use it in GitHub Desktop.
Save dongilbert/2509702 to your computer and use it in GitHub Desktop.
Use Git with WordPress Plugin Development
=== Using Git with WordPress Plugin Development ===
git svn clone -s -r<rev-number> https://svn.wp-plugins.org/<plugin-path> <-- Clone the plugin repo
cd <plugin-path> <-- change to directory
git svn fetch <-- Pull svn history
git remote add -f github git@github.com:<github-url> <-- add github remote
/* ADD CODE */ <-- write code
git add * <-- add to git
git commit -m "Starting to code" <-- commit changes
git svn dcommit <-- push to svn
git push -f github <-- push to github
git tag -a 0.1 -m "Tagging 0.1" <-- tag current branch
git checkout 0.1 <-- switch to tag
git svn tag "0.1" -m "Tagging 0.1" <-- push tag to svn
git checkout master <-- return to master (or whatever other branch you were working from)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment