• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Git with Subversion for WordPress Plugin Development Detailed Guide

By Abhishek Ghosh January 1, 2014 8:13 am Updated on January 1, 2014

Git with Subversion for WordPress Plugin Development Detailed Guide

Advertisement

Git with Subversion for WordPress Plugin Development Detailed Guide Explains How To Use Git like GitHub, your Mac and WordPress to Keep Plugins Updated. This is Fully Command Line Based Guide. We are using OS X 10.9.1 while writing this guide. Git with Subversion for WordPress Plugin Development Detailed Guide is quite important as this keeps our development in three places – your Mac, Git like GitHub (or your own server with Git). Usually we only use local computer as backup copy for ongoing development, but adding Git in the middle has the basic advantage of having another copy at hand on the server. It was great if WordPress directly used Git, but till date, SVN is used.

 

Git with Subversion for WordPress Plugin Development : Needed Stuffs

 

It is impossible to go with the basic details – it will make this guide too lengthy. Just to say what we are using for this Git with Subversion for WordPress Plugin Development Detailed Guide. We are using HomeBrew Package manager with iTerm2. (You can see the setup here). Practically things has not been changed since Mark Jaquith wrote the guide – Developing on WordPress using Git. git svn <argument> itself a command. You just need to update and upgrade HomeBrew, install SVN and Git via HomeBrew – they will normally rightly work on OS X Mavericks. Te error with git svn rebase which disturbed before has been fixed by HomeBrew now.

 

Git with Subversion for WordPress Plugin Development : The Whole Thing

 

It is quite pathetic to work with SVN on Mac than Git. We are assuming that you have a WordPress Plugin and a GitHub Account. Normally, we are always on our user named folder on Terminal/iTerm2, so we will create a directory first – named like wp-plugins or something. This is to keep the future Plugin developments easier.

Advertisement

---

So, create the folder :

Vim
1
mkdir wp-plugins

 

Now get the last revision number by using this command :

Vim
1
svn log http://plugins.svn.wordpress.org/ftp-to-zip/

ftp-to-zip is our Plugin’s name, you must replace with your own Plugin’s name. You will get output and lot of numbers with your commit comments. Get the last one and run this command :

Vim
1
git svn clone --no-minimize-url -s -r583286 http://plugins.svn.wordpress.org/ftp-to-zip/

Change the r583286 and ftp-to-zip with your own data. You will get terminal output like “Initialized empty Git repository in…”. Great. Change directory to the folder now :

Vim
1
cd ftp-to-zip

Now run this command :

Vim
1
GIT_TRACE=2 git svn fetch

There will be huge terminal output running for long time! You need not not read them! It will stop, for example at 583286 in our case. We need to move the SVN HEAD into our Git master :

Vim
1
git svn rebase

All files will appear on your local computer, that is Mac now. You can open the location using Finder. We tell this cheatsheet everytime working with any kind of Git. Basically this is a sort of cheating – we can change the things from GUI.

Now, in case of any wrong things with SVN, in case you added any SVN url wrong, you can fix it by removal :

Vim
1
git config --remove-section svn-remote.svn

This command is only for correcting mistake – not a part of this guide.

Now, create a new GitHub repository with the same name (for making the things easy) from browser, i.e. web UI. There is video in the linked guide.
You will ultimately land in a webpage in GitHub saying “Create a new repository on the command line” and the commands :

Git with Subversion for WordPress Plugin Development Detailed Guide

Vim
1
2
3
4
5
6
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:AbhishekGhosh/ftp-to-zip.git
git push -u origin master

Normally, your needed commands will be there, there is nothing to think with these lines of commands here. Now, actually we will change some files and normally push it to GitHub, with usual Git Commands like:

Vim
1
git commit -am "Vomiting like a blind, Everything sucks, really"

You can merge, you can do anything you want towards Github – its working in the middle. Copy-pasting readme.txt to README.md will work fine for the easy to read part. Now to commit the changes towards WordPress, you need two commands :

Vim
1
2
git svn rebase
git svn dcommit

If git svn rebase command does not work, try (in excerpt format, in this way) :

Vim
1
2
3
4
git svn clone -s -r583286 https://plugins.svn.wordpress.org/ftp-to-zip/
git remote add -f github git://github.com/AbhishekGhosh/ftp-to-zip.git
git merge github/master
git svn dcommit

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Git with Subversion for WordPress Plugin Development Detailed Guide

  • How to Use Subversion From CLI For WordPress Plugin

    Most Get Confused to Use Subversion From Command Line. Here is How to Use Subversion From CLI For WordPress Plugin First Release or Update.

  • SVN CLI Commands for OS X for WordPress Plugin Developers

    SVN CLI Commands for OS X for WordPress Plugin Developers are quite nice to learn. Rely us, instead of finding a GUI tool for OS X SVN, Command Line is cleaner.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

  • SVN or Apache Subversion : What is SVN and How it Works

    SVN or Apache Subversion is a free software for version control of files and directories for Open Source Software distribution and used by hosts like WordPress.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • What is Hardware Security Module (HSM)September 30, 2023
  • Transducer Technologies of HeadphonesSeptember 28, 2023
  • What is Analog-to-Digital Converter (ADC)September 27, 2023
  • Comparison of Tube Amplifiers and SemiconductorsSeptember 26, 2023
  • What is a Digital-to-Analog Converter (DAC)September 25, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy