Wednesday, November 14, 2018

Differences between Git and GitHub


This tutorial is intended for the new and would-be developers/programmers who came up against perception of differences between Git and GitHub.

Note that there might be some informal terms in the article. I’ve purposely used those for the purposes of making things easier to the beginners. I really apologize to the veteran developers and programmers for that.

So, now, let me get into the point.

In a nutshell, there are two noticeable differences between Git and GitHub.
  1. Git is a desktop application/software.
  2. Github is a website, code repository website. (Almost all the websites out there are web application software though. Just for avoiding confusion I said ‘website’.)
Well, let’s dig in with a bit of perception.
As I mentioned earlier, Git is a desktop software which we need to download from a website(https://git-scm.com/). And then we install it into our local computer as we install other desktop software. Then we need to initiate Git to our project in order to control it (our project) using Git.

To make things simpler, let’s consider that we have a PSD file and we are going to develop a WordPress theme. First we need to convert the PSD to HTML document. And then we need to make the static HTML site dynamic using PHP.

We can assume that there are two steps involved here:
  1. PSD to HTML/CSS conversion
  2. HTML/CSS to WordPress development.
Now after completing the first stage you may want to keep a copy of the HTML work. You can easily do it by preserving a copy of it on your computer, right? And then keep working on the main project files. But what if you want to preserve the copy of your every single significant change like non-responsive and responsive html designs, with and without carousel versions, with and without JavaScript/jQuery plugin versions, and so on? Now what? Yes, you can also now preserve every copy of them. Even I myself did it previously. But it’s obviously a tiresome and time consuming process. And it’s almost impossible for a big project really. Or, what if you want to get back to your previous code that has already been deleted :( ? This process is called code revision.

Yes, to make keeping code revision easier, Git came to the scinerio. Just download and install Git to your computer, as I mentioned above. Then initiate Git to your project folder. This silly project folder/directory will now be called Git repository, LOCAL repository, as it is located on your local computer. Now your project can be tracked by Git, i.e., you can take snaps of your every single step. And you can get back to any stages of code writing.

Even if you want to keep your several versions of the software, and in case, you want to get back to your previous version, you can obviously do it with Git. That is Git can control your version simultaneously. That’s the reason Git is also called Version Control System (VCS).


Look! All stuff we did so far was on our local computer. We didn’t need online connection, GitHub or anything. We can track our project with Git offline, and no need GitHub.

Let’s assume you have a team of developers. Now you want your project to be done by the team members together. How is it possible? Yes, you’re absolutely right. You need to host the project to such a website the team members can access from their local computer and can work together on it. GitHub is the website that hosts the Git projects. It’s also called the repository of code. According to the OALD, ‘repository’ means a place where something is stored in large quantities i.e., store-house. GitHub is the store house of open source code.
So, now it’s clear that developers/programmers can host their Git projects (controlled by Git software on the local computers) on GitHub (remote computer i.e., website) so that others (developers/programmers/end-users) can contribute to it by developing, and of course, use it individually.

Hope that there’s something worth reading in this article that takes your understanding of the differences between Git and GitHub to the next level.

And it would be appreciated if you draw my attention to any inconsistency, in terms of any info given, English language, or anything. Please let us know your thoughts and experience.

Thanks for taking the time to read.

wp_register_script() – When to Use

As soon as I had come to know that wp_enqueue_script() function was the proper way of adding script in WordPress, I came to know about one ...