Wordpress & Web Development

What Is Git & Why You Should Use Version Control If You’re a Developer

James Bruce 03-10-2012

version control softwareAs web developers, a lot of the time we tend to work on local development sites then just upload everything when we’re done. This is fine when it’s just you and the changes are small, but when you’re dealing with more than one person working on something, or on a large project with lots of complicated components, that’s simply not feasible. That’s when we turn to something called version control.


Today I’ll be talking about an open source version control software called Git. This allows more than one person to safely work on the same project without interfering with each other, but it’s so much more than that too.

Why Use Version Control Software?

First and foremost, the name should give it away. Version control software allows you to have “versions” of a project, which show the changes that were made to the code over time, and allows you to backtrack if necessary and undo those changes. This ability alone – of being able to compare two versions or reverse changes, makes it fairly invaluable when working on larger projects.

You’ve probably even done this yourself at some point, saving out copies of a project at different points so you have a backup. In a version control system, just the changes would be saved – a patch file that could be applied to one version, in order to make it the same as the next version. With one developer, this is sufficient.

But what if you have more than one developer working on a project? That’s when the idea of a centralised version control server comes in. These have been the standard for a long time, whereby all versions are stored on a central server, and individual developers checkout and upload changes back to this server. If you’ve ever looked at the edit history of a Wikipedia page, you’ll have a good idea of how this works in a real world scenario:

version control software


The benefits of a system like this is that multiple developers can make changes, and each change can then be attributed to a specific developer. On the downside, the fact that everything is stored on a remote database means no changes can be made when that server goes down; and if the central database is lost, each client only has the current version of whatever they were working on.

That takes us on to Git, and other so-called distributed version control systems. In these systems, clients don’t just check out the current version of the files and work from them – they mirror the entire version history. Each developer always has a complete copy of everything. A central server is still used, but should the worst happen, then everything can still be restored from any of the clients who have the latest versions.

Git specifically works by taking “snapshots” of files; if files remain unchanged in a particular version, it simply links to the previous files – this keeps everything fast and lean.

It might also interest you to learn that Git is used to manage and develop the core linux kernel – the base building block upon which all linux distros are built.


version control

What’s Github?

Although you can run your own Git server locally, Github is both a remote server, a community of developers, and a graphical web interface for managing your Git project. It’s free to use for up to 5 public repositories – that is, when anyone can view or fork your code – with low cost plans for private projects. I strongly suggest you go sign up for a free account so you can start playing around with your own projects or forking someone elses.

version control

Forking & Branching

These are core concepts to the Git experience, so let’s take a moment to explain the difference.


You’ve probably heard the work “fork” when dealing with linux distros. If you’re familiar with the media center app Plex, you’ll know it was originally a fork of the similar open source Xbox Media Center Aeon Nox 3.5: Beautiful And Customizable Theme For XBMC Set up your media center exactly the way you want it. Aeon Nox 3.5 is the most recent version of what is perhaps the best theme for XBMC, and it is a rare combination: beautiful... Read More . This simply means that at some point in the past, some developers took the code of XBMC, and decided to go their own way with it; that became Plex.

This is of course totally allowed when the project is open source – you can take the code, do whatever you want with it. With Git, if you feel your changes are good enough to be rolled back into the “master” project, you can make a “pull request” to the author, asking them to pull your changes back into their original project. This allows you to have hundreds of thousands of developers working on a project at any point, none of whom must neccessarily be approved for code access – they just copy the code, make changes, and request to be rolled back into the master. Of course, it’s up to the owner of the original project if they decide to accept your changes or not.

Branching is something done internally on a project by the authorized developers. It allows you to easily separate specific issues or features, and work on them without breaking the master files. Once you’re satisfied that your branch has dealt with the issue, you merge it back into the master. At any point, there can be as many branches as you like; they don’t interfere with each other. You can also merge changes between branches without touching the master.

Here’s a great diagram of an example workflow by Vincent Driessen:


version control software

Next time, we’ll look at how to set up a working Git example and make code changes within branches. Version control is a huge topic. I’ve only given the briefest overview here, but as a developer who is used to just making changes and undoing them if they don’t work, the whole concept has blown my mind – I hope it does yours too.

Are you a seasoned developer with experience in Git? Are you just getting started and think you’d like to have a go? Sound off in the comments!

Related topics: Programming, Project Management, Web Development.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Mauri Cleophas Opande
    February 13, 2018 at 9:40 pm

    wow, it's awesome and good for a free learning lesson on modern technologies.

  2. Giles
    February 12, 2016 at 3:14 pm

    Great article, but my version of Elementary doesn't have "tweaks", or anything that looks remotely like it. Can anybody give me any clues on how to progress? Thanks in advance.

    • James Bruce
      February 12, 2016 at 4:04 pm

      ... What's "Elementary"? This article is about Git, and Github.

  3. Wesam Alalem
    January 9, 2013 at 9:08 pm

    Thank you. great article about GIT. I just started using it, the concept is totally new to me, but 'am digging my way :)

  4. Anonymous
    November 22, 2012 at 8:35 am

    Excellent! Bookmarked this as I hope I can follow how to utilize GitHub step by step. Thanks

  5. Mitesh Budhabhatti
    October 11, 2012 at 11:54 am

    I am using Visual Source Safe 6. Can I replace VSS with Git?
    Thanks for the great info !

  6. Harish Jonnalagadda
    October 5, 2012 at 4:37 pm

    GitHub is awesome!

  7. Scutterman
    October 5, 2012 at 2:50 pm

    I tried toinstall a GIT server onto a CentOS box and spend hours if not days trying to get it to work with a Windows client. I switched over to SVN and had it set up and working in just 2 hours.

    I'm looking forward to the next part, so I can see if I was doing anything in particular wrong, but it seems to me that a fair number of people have stability issues with GIT.

    • muotechguy
      October 5, 2012 at 3:00 pm

      Hmm. I hadn't considered using it windows, but then I have a Github too rather than my own server. If it's just working on something, Git probably isn't the best choice anyway. That siad, this is all relatively new to me.

      • Scutterman
        October 5, 2012 at 9:47 pm

        From what I've heard, Linux git client and Linux git server is okay, and so is Windows git client / server, but combining the two can cause problems. For me the issues were that it would randomly refuse to authenticate, and would take hours to sort out why.

  8. Nethu Alahakoon
    October 4, 2012 at 1:36 pm

    this is actually great for my development needs!

  9. Scott Reyes
    October 3, 2012 at 11:40 pm

    The first time I looked at Git it was a complete mess to me(too many different ideas). Thanks for writing this article as it is easy to follow and understand.

  10. Mac Witty
    October 3, 2012 at 11:19 pm

    Thanks, now I know at least know what this "GIT", our programme girls talk about, is. They tried to explain it one day but I couldn't really follow them, this was much clearer

  11. Anthony Monori
    October 3, 2012 at 8:44 pm

    I just started using Git and I love it. One of the most helpful tools for every developer and not only!

  12. Ben Klaas
    October 3, 2012 at 8:17 pm

    That example workflow diagram describes perfectly my love for Git, as well as my hate.