No results found

Your search did not match any results.

We suggest you try the following to help find what you're looking for:

  • Check the spelling of your keyword search.
  • Use synonyms for the keyword you typed, for example, try "application" instead of "software."
  • Try one of the popular searches shown below.
  • Start a new search.
Trending Questions

What is Github?

While a technical tool, GitHub has almost become a household name, whether you code or not. It has also enabled some of the most advanced technological advances in cyberspace. And what's most intriguing is it is fully accessible to anyone, anywhere. If you're still unfamiliar with the platform, however, this guide should break down everything you need to know to understand GitHub and what it can do.

What you need to know about Github and its endless repository of open-source code

The first thing to note is that Git and GitHub is not the same thing.

To break it down, the “Git” in “Github” stands for Global Information Tracker. It is an open-source version control system to manage and track source code history, created in 2005 to help developers working on Linux.

GitHub is a cloud-based hosting service and company that aims to make managing your git archive easier—particularly useful if you are a developer looking for and working on open source code projects. GitHub was founded in 2008 and it has created tools that can be integrated with git. It's not the only company that has done so and nothing is stopping you from installing git on Windows or Safari. However, some have asked why doesn't GitHub open source its own code? Understanding that GitHub is a private company that serves to make a profit perhaps answers this question.

Nevertheless, many have found it a useful platform that makes the development process quick and alluring while serving as an educational resource.

On GitHub, a team would upload a master copy of their repository that other programmers can copy onto their own computer. Their changes are eventually merged with the master copy or repository.

The Pros and Cons of Using GitHub

GitHub and indeed git has many features that make managing projects much easier, although it holds some drawbacks too.

The version control aspect of git means it is easier to track projects when multiple people are simultaneously making changes to the original code.

Using GitHub, everyone working on a project can end up with a copy of the same code on their computer. This means if anything happened to GitHub, it would, in theory, be possible to piece the whole thing back together again.

GitHub pages also host comments, bug reports, and feature requests which have helped many projects and GitHub itself evolve and improve. In particular, GitHub's bug tracking feature makes it easier to fix bugs with an easy dashboard filter.

Some other GitHub benefits include:

  • A user-friendly interface and excellent SEO that makes open-source projects and trending repositories—or Gists—easy to find
  • The ability to widen your developer network and the ability to share code, text fragments, or other information on Gists, which can be divided up and updated
  • Team management capability and features to coordinate team tasks and to manage outcomes
  • Compatability with most cloud hosting services

There are some limits to GitHub, however, including:

  • Premium membership, which restricts what GitHub repositories you have access to
  • An expensive premium or pro version
  • File size limits on repositories up to 1 Gb with each file size requirement below 100 Mb

Getting started with GitHub

To get started and see the utility of GitHub for yourself, you first need to create a GitHub login, which you can do here.

After signing up, install git. Anyone familiar with git commands can use a terminal on their computer but a GUI (graphical user interface) like GitHub Desktop can help make the process much easier.

Here are some steps to follow if you’d like to get to know GitHub:

  • Create a repository: You will also see this referred to as “repo.” A repo is a storage unit for anything relevant to the project you're working on, including files, images and datasets, etc. Create the repo by selecting "new repository" towards the upper-right-hand corner of the interface, add a name and description and select "initialize this repository with a README." Your README should describe the repository's purpose, what the code does, and how to use it. You can then "create repository."
  • Create a branch: Creating a branch or multiple branches to your project allows you to work on various versions of your code before committing the changes to your master version. Create a branch in GitHub by selecting the dropdown "branch: master" in the repository you are editing, name the branch and "create branch." Any edits are made in code view using the pencil icon.
  • Commit changes: When you finally want to commit the changes to the master code, go to the code view of the branch you're working on and alongside your edits, write a message describing the changes before selecting "commit changes." Each edit saved is a "commit."
  • Open a pull request: A pull request tells other developers working on a project that you want your changes included in their branch and can be made at any time under the "pull request" tab. Different colors easily identify updates to the code and you can "@" individuals for specific mentions.

How to download and use source code from GitHub?

If you're new to GitHub, it might take a moment to orient yourself and figure out how to and download files, often with no prominent download button in GitHub. Sometimes developers go ahead and view each file and then copy and paste it to a local file but there is another way: downloading.

Downloading is easy: traverse to the top level of your GitHub project, where you will see a green Code download button on the right-hand side. From the drop-down menu, select "Download ZIP" within which the entire repository can be downloaded.

You can then use the GitHub sample code by downloading it or cloning the repository on your desktop and running the git clone command. While using this command, paste and replace “repo-url” with the clone URL. The source code is then available at your preferred location.

How to read code on GitHub?

Reading code on GitHub is much like reading any computer language code and in all cases, reading code is not like reading a book with a logical sequence from beginning to end.

It can be quite confusing to know which part of the source code, which file, to read first.

Whether you’re working with Javascript, C++ or Coffee Script, there are different approaches to reading code. You can approach it by the execution order, by starting with the largest source code file or setting an early breakpoint and then going through it via a debugger or setting one deeper and reading the functions in a call stack.

As you keep reading code, you'll develop the best and more efficient approach for yourself.

How to compile and run GitHub projects?

For most projects, you'll need an integrated development environment. Each repository should have a README file to advise how to build/compile the project.

Sometimes the main repository has a “Releases” tab which takes you to a list of releases where the project is already compiled, which is by far the easiest way to compile a project.

Gitlab vs GitHub

As mentioned, GitHub is just a hosting platform and as such other platforms can also host git. GitLab is one such popular alternative and is similar to GitHub in that they are both web-based and hold repositories to assist in managing large coding projects. Both prevent bugs and serious issues when multiple developers work on a project by allowing developers to easily track changes and fix bugs.

However, there are some differences between the two platforms. Depending on the aims of your team or project, you may prefer one over the other.

GitHub, for instance, may serve a larger team of developers lured by its easy to use interface and huge database of open-source code with helpful guides. Its community is vast and well-established. That means that individual developers or a GitHub student can go in and collaborate with other individuals without a team already in place.

Its offering of pull requests and comments that automatically close when they merge with the repo make issue tracking easier. In addition, there are some unique features to the platform such as GitHub Actions aimed at automating all software workflows, GitHub Markdown, which stylizes text, or GitHub CoPilot, which autocompletes code.

What it has in easy utility for large collaborative projects, it lacks when it comes to API development with GitHub API having a rate limit — a shortcoming for GitHub applications. The price could also be prohibitive.

GitLab, on the other hand, is continuously evolving, with new features added all the time. If you prefer a command-line interface, GitLab has that covered. It also supports CI/CD (continuous integration or continuous development) and, like GitHub, offers pull requests and code can be easily managed. Unlike GitHub, it lets users locate a repository within an organization while still under the free plan. The community on GitLab is still relatively small, but it is favoured for DevOps.

In a nutshell, GitLab could be a less expensive option but GitHub has the advantage. As coding skills and virtual programs become more coveted, GitHub's prominence will likely follow suit.