When it comes to talking about Git and WordPress, Subversion and WordPress, or any version control and WordPress, some people are immediately turned off.

Version control is scary. It’s overwhelming. It uses terms that aren’t clear as to what they mean; the advantages aren’t immediately evident, and the learning curve can be steep no matter how nice our GUIs get.

But in my opinion, if you opt to increase your ability as a professional developer working in the WordPress economy, learning a version control system is something that’s highly recommended.

The benefits far outweigh the learning curve, and once you get used to the workflow, you’ll likely wonder how you ever lived without it.

But the biggest challenge? Figuring out exactly where to start.

All About Git and WordPress

Some of you are likely familiar with Peter Suhm. I’ve talked about some of his previous work early last year. This time around, though, I’m opting to share something he’s making freely available, and it’s specifically targeting those who:

  • Work with WordPress,
  • Are not familiar with Git, at all.

First and foremost, an important thing to note is Git is not the same as GitHub. Git is a version control system (which I’ll talk a bit more about in a moment). GitHub is a website using Git as the version control system of choice (again, I’ll talk about this more in a moment).

But for those who are ready to get started and are looking to learn the ins-and-outs of Git in the context of WordPress, I recommend checking out Git For WordPress Developers.

Git and WordPress

Git and WordPress

The site offers 35(!) completely free(!) screencasts walking you through learning the ins and outs of Git and how they can benefit you in the work you do with your WordPress projects.

What’s Git?

As described by the official Git website:

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

This makes sense if you’re someone who’s used other version control systems in the past, but if you’re new to this whole thing then it may be a little confusing.

If I could try to make is as simple as possible, I’d say something like this:

Version Control is a way for you to track the status of each file in your project. Think of it as taking a snapshot of your source code at a point in time. If something goes wrong, you can always roll back to a previous version. If all is well, then you can push that version of the code out for users to use.

Yeah, it gets a bit more complicated when you introduce teams into it (and start talking about branches and what not), but that’s not what I’m looking to cover in this post.

My definition is probably in need of work, so feel free to offer your own in the comments.

What’s GitHub?

GitHub

GitHub is a site basing its entire functionality around Git. It provides a front-end through which we can all interact with publicly available source code.

  • We’re able to view the source code.
  • We’re able to copy the source code into our own repositories (which is a fancy word for the place where code is stored).
  • We’re able to propose changes to other people’s source code.
  • We’re able to track issues with our source code (and other’s source code).
  • …and so on.

For those involved in WordPress, think of it like this: Git is to GitHub as Subversion is to the WordPress Plugin Repository.

WordPress Repository

Though it’s not a one-to-one analogy, the WordPress repository opts to use Subversion as its foundation for managing source code. GitHub uses Git.

Go Learn!

With that basic primer in place, check out the work Peter has done to introduce Git to the WordPress development community.

Check out the screencasts, get used to the commands, and then once you have a solid understanding, considering using a GUI to help manage your projects. No, not everyone is a fan, but if you’re looking for something to use once you’ve got a solid understanding of Git, then I’m a fan of Tower.

Category:
Resources
Tags:
,

Join the conversation! 9 Comments

  1. Hi, Tom!

    What do you think about my version of WordPress + Git?

    It’s simple boilerplate for WordPress project.

    Here is link: https://github.com/LehaMotovilov/wp.dev

  2. Great resource. Can’t wait to dig into it. Learning Git more deeply is at the top of my list of things to learn this year. I’m familiar with Github, but only have passing command line knowledge and use of Git so far. I’m hoping to change that ;-)

  3. Ok, thanks. I’ll wait for feedback :-)

  4. Totally agree! Forced myself into using Git and learning it on-the-go years ago. And while I had experience with SVN, Git was different and, well, better :)

  5. Great post.

    Might I add that Peter also has an awesome email newsletter over at WPPusher.com, which provides an introductory Git crash course, and primer.

    Its a 5 day email course, and does an excellent job of introducing the Git fundamentals, the workflow and mindset that’s needed to work with it.

    I would recommend his email newsletter (as an introduction), then diving into the Git for WordPress Developers site.

    I’ll be doing the same.

    • Might I add that Peter also has an awesome email newsletter over at WPPusher.com, which provides an introductory Git crash course, and primer.

      He does and I’m glad you mentioned it!

      Its a 5 day email course, and does an excellent job of introducing the Git fundamentals, the workflow and mindset that’s needed to work with it.

      Yeah, if you’re new to version control then having a crash course of sorts is beyond helpful.

      I would recommend his email newsletter (as an introduction), then diving into the Git for WordPress Developers site.

      Thanks for the share, CJ — I hope it helps readers!

  6. It took me forever to learn Git and Github to the point I felt comfortable using it, but not only was it worth it, I felt, and still feel, it’s necessary if you plan to do any major projects at all, or ever work with serious developers, because that’s what they’re going to be using. Not to mention its just an awesome place to store and organize your work and has cool extras like GitHub pages and Gitbook.

    One of the great things about learning it is that you’ll become familiar and comfortable using the command line, which is valuable as well. You’ll rarely use the GIUs if you take the time to learn even the basic Git commands, I find.

    • I felt, and still feel, it’s necessary if you plan to do any major projects at all, or ever work with serious developers, because that’s what they’re going to be using.

      Agreed! Not only that, you couple it with things like automated deployments, tagging, branching, merging, etc., etc., etc., and you’ve got a whole new workflow to learn.

      Not to mention its just an awesome place to store and organize your work and has cool extras like GitHub pages and Gitbook.

      Right?!

      One of the great things about learning it is that you’ll become familiar and comfortable using the command line, which is valuable as well. You’ll rarely use the GIUs if you take the time to learn even the basic Git commands, I find.

      This is true! Though, I won’t lie, I moved to Tower (well, Tower 2), after a while. I don’t mind the CLI but I also like GUIs. Really just depends on the use case.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.