Source code control is nothing new to software development. It’s been around for decades. But for those of us who work in the open source community, specifically those who are working with WordPress, we may not have the experience that some of our peers have.
After all, many of the people who work on or work with WordPress are people who are seasoned software developers or who have been working on software for a long time.
The online Subversion repository for a simple WordPress plugin.
And to be clear, this doesn’t mean they learned source control within the context of open source development – maybe they did, maybe they didn’t. In short, they’ve had time to learn the advantages of workflows for and reasons why source control is so important.
Ultimately, the point I’m trying to make is this:
If you’re new to WordPress, and you’ve heard about source control, Subversion, Git, or GitHub or even used it to some degree (even if you aren’t entirely sure what you’re doing), that’s okay! Everyone starts at the beginning.
The purpose of this primer is to help explain some of the benefits of source control, why we use it, and how it plays a role in our day-to-day activities especially when we’re working with others.
Git and the command line can be a daunting prospect, luckily there are multiple Git GUIs, which work across a variety of platforms such as, OSX, Windows, and Linux.
In this post, we’ll be taking a look at the two most important ones. GitHub Desktop and SourceTree by Atlassian, the company behind Bitbucket.
Push-to-Deploy is the feature of WP Pusher that will keep your WordPress websites up-to-date every time you push some fresh code to your Git repositories. In this post, we are going to take a look at what Push-to-Deploy is, how best to use it for an effective workflow.
Last week I wrote a guest post over on the WP Tavern about how fundamental Git is for WordPress teams. In the post, I mention 3 signs that will make it obvious to me that your WordPress development team is not in fact working as a team – but rather as small 1-man teams. The 3 signs are:
- Lack of version control
- Lack of a code collaboration platform
- Lack of a deployment strategy
Git is a fundamental enabler of team work, so without it, it’s hard to get to step 2 and 3 in that list. If you want to read the article, check it out over on WP Tavern.
As part of the Git for WordPress video course, Danny van Kooten shows how he uses Git to release a new version of his plugin MailChimp for WordPress.
Danny van Kooten is the founder of Ibericode and the creator of MailChimp for WordPress, one of the most popular WordPress plugins on WordPress.org. I have known Danny for a while and I know he has a pretty solid workflow, so I reached out and asked if he would like to share it, which he agreed to. Thank you, Danny!
I think it is fair to say that pull requests were made popular by GitHub and their brilliant implementation of the concept. Used in a strategic way, pull requests are a very powerful collaboration tool to have in your toolbelt – especially if you work in a team.
According to OSS Watch, a pull request “is a method of submitting contributions to an open development project“. But a pull request can be more than that. If you really adapt pull requests into your workflow, they provide a great space for teams to communicate, collaborate, educate and onboard new team members. This is now the norm in most open source projects, but many development teams – especially in the WordPress sphere – are not even using Git yet. If your team have not yet adapted Git (or another version control system) into their workflow, they are simply lacking the most basics of collaboration tools. The abillity to discuss and review code changes in a pull request is just one of many reasons to use Git, but it is definitely one that is big enough on its own.
There’s a question I get quite often about WP Pusher and that is: “do you handle updates to the database as well?”. The answer to that question is “no”. WP Pusher is meant as a tool to deploy code changes to plugins and themes that are under version control with Git. I always tell people that they should take a look at the Migrate DB Pro plugin instead, since it does exactly that. Recently, I started talking to Brad, the creator of Migrate DB Pro and guess what he told me: Just as people ask me if WP Pusher can deploy database changes, people ask him if Migrate DB Pro can deploy source code changes. See where I’m going with this?
When you use Git in your WordPress deployment flow, there is a special configuration file you should be aware of.
.gitattributes can drastically clean up your plugins and themes for end users. Follow along and I will show you how simple it is to use.
The WordPress world, once dominated by Subversion, mainly due to the infrastructure of WordPress.org, is slowly moving towards using Git. This is great news, but for many developers Git can seem strange or even intimidating. In this post I will do my best to demystify Git for WordPress developers.
This is the story about how I wasted 3 days, but also, which is more important, how I set up continuous integration for WP Pusher with CircleCi. With a continuous integration service, you can have your tests run on every commit and ensure that nothing is broken. That is, if you have some tests to run of course.