How to : Github 101

GitHub is the go-to collaborative workspace for coders, programmers and developers (all 3 are different terms) alike. This is going to be a guide from zero on what is GitHub and how to get going instantly. I expect the reader to have zero experience with GitHub and no knowledge on the working of the same, whatsoever. I will try and use as few jargons and possible.

What is GitHub?

This is what GitHub is, according to Wikipedia:


GitHub Inc. is a web-based hosting service for version control using Git. It is mostly used for computer code. It offers all of the distributed version control and source code management functionality of Git as well as adding its own features

Wikipedia

Let me break that down line by line.


GitHub Inc. is a web-based hosting service for version control using Git.
It is mostly used for computer code

Git is an actively maintained open source project developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system. So basically, in layman terms, Git is a project which allows users to manage version control of their projects. What this means is that, if have a perfectly working project on which you have spent hours working, you change just a part of the code and the program goes boom – it won’t work anymore. Simply, sad. That is where Git helps you, it provides version control, where you won’t lose your earlier version which was working perfectly fine and at the same time work further. The only problem with Git is that you need to learn the syntax. This means hours mastering Git commands.


It offers all of the distributed version control and source code management functionality of Git as well as adding its own features

GitHub is basically Git, on the web, and without the somewhat discouraging to start with commands. It is basically a website which allows you to keep all your code, documentation etc. on the web and allows you to exercise version control at the same time. It has a nice and clean GUI (Graphical User Interface) which means you don’t need any commands, you can use Git with the comfort of your mouse. Not only the version control of Git, but GitHub also provides many other useful features of its own.

How to get started on GitHub?

GitHub Landing Page/ Sign Up Page

Open up GitHub in your browser, and sign up as shown in the image above. Once you are signed up, verified you email and filled up the information, you will be redirected to your dashboard. Mine looks something like this :

SarthakCode’s dashboard

Yours will be a lot less messier with not much to show.

Repositories, Commits and PRs

There are just 3 main words which you need to know in order to work with GitHub.

Repositories

Making a new repository

Repositories are basically projects. They are often (always) abbreviated as repos. These are the main, high-level project where you can see all the files and redmes in the project. Repositories can be forked. What this means is that you can get a copy of all the files in the project on your account and work on it even if you don’t have permission to edit the real repo. You are working on a repo but all the changes will be stored to the forked repo i.e. the one on your account and not the actual one.

Commits

An example commit

Commits are the changes you make on a project, but they are not instantanously implemented. GitHub knows that you have made the change but it does not yet implement the same. Commits can be of any type – changes in code file, changes in readmes, addition of new files, deletion of old files etc.

Pull Requests

An example PR

Pull request (or PR) is basically a request to implement the committed changes. Literally, a PR means that you are pulling changes from the copy of the repo on your account to the actual repository. These can be approved by those who have permission to do the same in the particular repo.

That is all for now. I hope you find this guide useful and informative. Suggestions for additions to the same are appreciated. Any questions are welcome. The comment box is all yours πŸ™‚

6 Comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s