What is GitHub? A Complete GitHub Tutorial for Beginners

What is GitHub? A Complete GitHub Tutorial for Beginners

Sharing is caring!

As an aspiring net developer, it’s possible you’ll already be accustomed to GitHub as software you need to use to retail your code on the net. It’s a key aspect of how an internet developer sometimes works. You might use it for one thing so simple as free cloud storage in your tasks, or it’s possible you’ll use it to point out your code to potential employers involved in assessing your coding expertise. Nevertheless, it’s essential to essentially ask “What’s GitHub?”, because it’s a lot greater than easy code storage.

In actual fact, it’s the software utilized by particular person builders and groups alike all internationally to collaborate with one another on nearly any sort of mission conceivable.

GitHub makes use of a chunk of model management software programs (extra on this later) referred to as “Git”, which you’ll be able to obtain and use in your native improvement machine. Git is a separate piece of software program from GitHub, and this text assumes you’re considerably accustomed to the idea of Git. If not, take a look at our clarification of the variations between Git and GitHub.

Github has many distinctive options that make it extraordinarily common as of late. In addition to easy storage, it’s a whole ecosystem full of an elaborate social networking side, permitting particular person builders to contribute to a number of groups and tasks. When you get into the circulation of managing repositories utilizing GitHub, you’ll get a concept of simply how helpful it may be.

With this information, I’ll present you with what GitHub is and supply some helpful recommendations on the way to use GitHub. This text might be broken up into the next sections:

  1. What’s model management?
  2. A Git refresher
  3. The GitHub overview: Major features and options
  4. GitHub: Wrapping up

1. What’s model management?

Model management is because the identity implies, a method to handle completely different variations of your codebase. We’ve written entire information to model management methods in net improvement for those who’re involved in studying extra, however, we’ll do a fast introduction right here. Firstly, let’s begin by asking the query “Why would you’ve completely different variations of the identical code?”

Take this into consideration while you’re enjoying an online game. You’re about to enter a tough dungeon from which you’ll be able to escape till you beat the boss. Earlier than coming into the dungeon, you’ll need to save your recreation simply in case the boss seems to be too arduous to beat and also you’re caught within the dungeon endlessly. If the boss seems to be too arduous, all you need to do is load the model of your recreation the place you have been exterior the dungeon and also you’re free to go off and stage up.

Nonetheless, while you enter the dungeon and start to progress, you’ll need to save your recreation alongside the best way, however, you don’t need to overwrite the unique recreation you saved exterior the dungeon. So while you save your recreation from contained in the dungeon, you create a totally new department, mainly a duplicate, of your unique recreation. For those who efficiently make it by way of the dungeon, then your present saved model turns into your new primary model, and also you proceed on by way of the sport. That is similar to model management with Git and GitHub.

An important software for groups of builders

Let’s say you have the software you’re engaged on with a group, and also you get tasked with including a particular characteristic to it. As a substitute for constructing the characteristic on the principle department (which may doubtlessly convey down your complete software for those who by chance break one thing), you make a “copy” of the application and start constructing the characteristic on that duplicate. If you’re performing growing the characteristic, you ask your teammates to assess your code. For those who get the “OK” from them, you possibly can safely “merge” your particular characteristic department again into the principal department.

When you have a number of builders engaged on the identical software, typically a number of builders might be engaged on the identical actual file. This could create issues when merging the information again collectively as a result of it’s unknown which model of the information is the right one. When this occurs (and it does occur, sadly), an excellent model management system helps to make the answer comparatively painless.

That is how Git and GitHub work for model management. They’re used in order that a number of folks can work on a number of information and a number of options in the identical software and keep away from main points on account of conflicting code or completely different variations on every developer’s native machine.

2. A Git refresher

Git is a chunk of model management software programs you possibly can obtain and use in your machine. You utilize it to mainly take snapshots (“commits”) of your file construction while you get it to a state you need to “save” (eg. after constructing a brand new characteristic, after fixing a bug, after including third-get together software program, and many others). You need to use Git to create branches (as defined above), resolve conflicts with completely different variations of information, and combine with GitHub in order that your snapshots (commits) may be pushed up in your group (or the world) to see.

That is sometimes performed through the command line, or you are able to do it through a Graphical Person Interface (or “GUI”, for brief). Nonetheless, it’s extensively anticipated that you are just capable of navigating Git on the command line, so for those who’re involved in including this important software to your talent set, you may as properly dive proper in with that!

3. GitHub overview: Major features and options

So what’s GitHub? GitHub is greater than only a place to maintain code protected within the cloud. It’s the software utilized by each native and distributed group collaborating on tasks. Be mindful, tasks usually are not essentially restricted to software programs!


Repositories (or “Repos” for brief) may be created by anybody. A single repo is normally used for a single mission. GitHub Repos are, by default, open to the general public. If customers don’t need the general public to have the ability to enter their Repos, they will select to maintain their tasks non-public for a small price. In this case, the proprietor of the repo has management over who can view or copy the code. Public repositories, however, may be seen and copied by anybody. Nonetheless, for somebody to have the ability to make adjustments to the unique codebase, the repo’s administrator should first approve it. So don’t fear—anybody can change your repository tasks until you give them particular permission!

Inquisitive about a profession in Net Improvement?


When somebody desires to make adjustments to a GitHub repository, the individual (normally a member of the group) will create a separate “department”, which is just a duplicate (properly, it’s not really a duplicate…Git’s technique of storing information is extra environment friendly than that, however, we are able to consider it as a duplicate) of the present model—usually known as the “grasp department”. The developer will work on the characteristic of this new department till the characteristic is full.

At the moment, the developer will “commit” (retailer a snapshot of) the code within the new department after which he/she’s going to create a “pull request”, which mainly lets the remainder of the group know that the character is completed and able to be code reviewed and, lastly, merged into the principle department. Workforce members can assess the brand new code (one other great way to make sure good code high quality) after which the administrator can approve the merge. The code will then be merged into the principal department, and the characteristic department may be deleted. That is all performed utilizing GitHub!

The GitHub social community

As a result of GitHub being so collaborative by nature, it shouldn’t be a shock that one other primary characteristic is its important social networking site. Customers can add footage and biographies, they will observe different customers and “favorite” their tasks, and naturally, type groups, or “organizations”, whose leaders can exert very particular management over the entry of the person members collaborating on a mission.


That is an instance of a single consumer’s “dwelling web page”. There’s a record of repositories, quite a lot of followers/customers adopted, and on the backside, there may be even a show of the quantity and frequency of contributions over the past 12 months to repositories to which the consumer has entry. It’s very very like the house web page of different social networks—besides that it’s for coding!

4. Closing ideas

So there you’ve it: A newbie’s introduction to GitHub. Whether or not you’re engaged on private tasks alone or are a part of a group engaged in a big enterprise software program, GitHub is a useful gizmo. For those who’re alone, you need to use it to retail your code and exhibit what you’ve performed to others. You need to use it to have a look at others’ tasks for inspiration and even fork (copy) tasks that you could prefer to broaden on and both contribute to or break off and begin constructing your individual mission.

In groups, it not solely helps to simplify the complexity of a number of builders engaged on a number of information on an identical time, however, it additionally aids collaboration—decreasing conflicts and enhancing code high quality. Many firms use GitHub for a lot of causes, so turning into accustomed to it’s completely important. So in addition to not simply saving you from embarrassing yourself by asking “What is GitHub?”, it’s a really fascinating talent so as to add to your net developer skillset!

Wish to be taught extra about GitHub and the way to use it?

  • GitHub itself has an ideal tutorial that can educate you on the fundamental circulation of making a repository, managing branches, making adjustments, and merging these adjustments through a pull request.
  • Developer Peter Cottle created a fantastic activity that helps extra visible learners find out about branching with Git. The primary 4 actions within the “Introduction Sequence” give customers follow in committing (making a “snapshot”), branching, and merging, in addition to one other essential subject not lined on this article: “rebasing”.
  • One other great explanation of Git that goes very in-depth (from a competitor of GitHub)
  • An excellent explanation of basic model management was dropped at you by Atlassian, proprietor of BitBucket.

Sharing is caring!