• Blog

    Latest from our Blog

  • Tools

    Our Favourite WP Tools

  • Hosting

    Recommended Web Hosts

  • Coupons

    Get great money off deals

  • Themes

    WordPress Theme Directory

  • Plugins

    WordPress Plugins Directory

  • Promote

    Your WordPress Product

Github is an open source online service that allows coders to host and share their work and do a whole lot more. If you are a regular WordPress user, then you will have probably heard of themes or plugins being hosted or available to download from Github.

You might’ve even heard of the term forking too. But what exactly is Github and why should casual WordPress users be interested in it? Read on to find out more in our beginners guide to Github for WordPress users.

Github Social Coding

What is Github?

Github can be described as an online code repository, however any files can be hosted on the service and not just programming or coding related files. Github has been built around the Git software and is a web based interface for working with these types of files.

When it comes to WordPress developers, Github is a popular place to upload and share plugins and themes. With an active community of WordPress developers, its a great service to use in order to find projects to collaborate, on as well as locate resources for developing your own projects.

The Git software offers revision control and source code management and Github is the most popular online place to host and share these files. As Github specialises in offering collaborative revision control, it is ideal for those looking to work with others on the same projects.

In even more simple terms, it could be compared to a cloud file storage service such as Dropbox. This is because it offers online sharing of files, along with revision control, taking snapshots of the various versions of a file as it changes an evolves.

However, what makes Github so popular with developers is the ability to collaborate on projects. The simple way that project repositories can be copied by another user, or forked, then worked on independently, before the changes are merged with the original project, makes it an invaluable tool for developers.

Throw social networking features into the mix and you’ve got a recipe for success.

Github steps

What is Forking?

In the world of Git files and Github, forking is the act of copying a repository over to your account. You would do this if you want to contribute to an existing project, or start your own project using an existing project as your base.  The source project could belong to anyone, as long as it is made available on Github.

When a project repository is forked, instead of performing just a regular copy and paste, forking keeps the connection between the two repositories. This means that the changes made to either version, can be pulled over to the other repository. This pulling feature works in both directions so the changes made to either repository can be pulled to the other.

How Forking Works

Github WooCommerce

If I want to add some new functionality to an existing WordPress plugin hosted on Github, I could fork the repository. Then download my copy of the project and start making my changes to the code. Once I was happy with my work I could commit the changes in order to upload it to my profile on Github. After that I could issue a pull request to attempt to have my changes included in the original repository. The manager of the original repository could decide whether to accept my request or not.

Because of the way Git works, the changes I had made to my forked repository would be merged with the current version of the source repository, thus updating the original plugin or theme. If any changes had been made to the source repository since I downloaded my forked version, they would not be overwritten during the merge.  This is even if my version does is no longer the latest version of the plugin, theme or code.

Why a Social Network too?

Another core component of Github is the social network-style features it makes use of. Users create profiles and can follow each other. Many developers of popular WordPress plugins can be found on Github, where their work can be followed, forked, downloaded and installed.

Github profile

By adding this social element to the site, Github has made it a great place to collaborate with other developers in your niche. It also makes it easier to decide whether to accept changes made to your repository, as you can view a user’s profile and gauge their experience and credibility as a contributor.

Installing Plugins from Github

Lots of popular and lesser known WordPress plugins can be found on Github. One way to install those plugins is to find them on Github, download the zip file and then upload it into your site.

However, there is also a plugin available which allows you to search Github for WordPress plugins, and then install them as you would a plugin hosted at the WordPress.org repository.

As you would expect the Github Plugin Search plugin can be downloaded from the code sharing site and installed manually. After that you can begin searching for plugins that are available on Github and install them directly to your site.

Github search

When looking around Github, it’s possible to find open source versions, or at least open source plugins that offer the same functionality as premium WordPress plugins. The Stripe add-on for WooCommerce is one such example.

Conclusion

I hope this very high level overview of Github has covered some of the basics accurately. If you’ve been curious about Gits, Hubs, Forks and the plugins that are uploaded to and available on the site, then you should now have some basic info to help you delve deeper into the service or back away now, knowing it’s not for you.

Check out Github

What has been your relationship or experience with Github and WordPress related code?


Disclosure: This page may contain affiliate links for which we will receive compensation if a purchase is made via the link.

Author:

Joe has been using WordPress for many years, for a number of different purposes. From personal blogs, to full-blown retail websites, and has even designed his own theme from scratch. He now enjoys using his WordPress experience to report on the latest news, and provide reviews and information on the best and worst themes and plugins on offer. Google Profile

Leave Yours +

3 Comments

  1. Do you know of a class where I can learn how to use Git for Mac for version control while working on custom WordPress theme development or editing child themes?

    I hate making changes only to discover I’ve created something else that needs to be addressed and have to retrace my steps to solve it.

    Sometimes a diff app helps, but it would be really cool to understand how to use Git properly.

    Thanks!

  2. Thanks Joe it’s all starting to make sense after reading this post.

    I’m a Genesis user and I asked some of the Devs, which Syntax Highlighter plugin they used.
    Most of them said “GistPress” which is hosted on GitHub.

    I’m still looking at how it works, but this post has helped a lot.

  • Comments are Closed

Search

Our Sponsors