DEV Community

Cover image for What is GitHub and how to use it?
Justin Graysen
Justin Graysen

Posted on • Originally published at justin-graysen.Medium

What is GitHub and how to use it?

GitHub is a platform for hosting source code and files with version control using Git. It is similar to a collaborative social platform where programmers and businesses post their projects for code development.

Github Logo

Why do we need GitHub?

The world of information technology is getting more and more crowded, new technologies are coming out in droves and at an impressive speed. People, to develop applications and programs capable of handling and controlling these technologies, are increasingly in demand.

With all this competition and diversity, how do you stand out in this environment? In some professions, it is common for professionals to have a portfolio to promote their work.

For example, musicians and singers promote their songs on SoundCloud or YouTube. But what about programmers? Where could they display their programs and code? That’s where GitHub comes in!

However, there is no way to understand GitHub without talking about Git, so to understand where Git came from, from GitHub, let’s talk briefly about it.

What is Git?

Git is a file version control repository, used for source code version control and collaborative development.

It was created in 2005 by Linus Torvalds, creator of the Linux kernel, to host the Linux source code and allow collaboration in its development, since the old company that hosted its code, BitKeeper, wanted to charge for its services.

How to install Git?

Git can be installed in Linux/Debian platforms using the following command:

sudo apt-get install git
Enter fullscreen mode Exit fullscreen mode

In other platforms like Windows or Mac, you can download through these links:

The importance of GitHub

GitHub, launched in 2008, is a web version of Git.

The projects on GitHub are mostly open source, but it is possible to make your code private, available only to a few people or by creating teams.

GitHub has already become one of, if not the largest code store in the cloud.

What is GitHub for?

Never forget: Git and GitHub are different things.

You can have Git for version control only on your local computer. GitHub is used when you want to share your code or put it in the cloud. GitHub has all the features of Git, and has many extra features listed below:

  • Documentation

  • Issue tracking

  • Wikis

  • Pull requests with commenting and code review

  • Commit history

  • Email notifications and emojis

  • GitHub Pages: small websites can be made.

How to use GitHub?

Let’s start tutorial on how to use GitHub. First, you need to create your personal account or a team account on the official GitHub page.

It is completely free for personal and team repositories, with some more advanced paid plans for teams and companies. After creating your account, use the platform’s Hello World guide to learn how to create your first repository, open branches and open a pull request.

What is a repository?

Github tutorial on how to create a repo

A repository is a space in which all the files of a specific project are stored.

Each project has its own repository and you can access it with a unique URL.

What is a fork?

“Forking” is when you create a new project based on another project that already exists. This is a feature that greatly encourages the development of programs and projects among the community or among teams in general.

Say you find a project on GitHub that you would like to contribute to, you can split the repository, make the desired changes, and release the revised project as a new repository.

What is a pull request?

Imagine that you have forked a repository, done a good review on the project, and want it to be acknowledged by the original developers. You can do this by creating a Pull Request.

The authors of the original repository can see your work and then choose whether or not to accept it into the official project. Whenever you make a pull request, GitHub provides an excellent way for you and the main project maintainer to communicate with each other.

GitHub is also a social network

GitHub also allows projects to grow exponentially with the social use of the tool. Each user on GitHub has their own profile as in any social network, ideal for showing their work and contributions in other projects.

Project revisions can be discussed publicly, favoring public debate and knowledge sharing. GitHub favors networking among developers and can boost your career.

Nothing gets a recruiter’s attention more than a GitHub that is popular and active with the community.

What to put in your GitHub?

After creating your account, you have may this question: what to put there?

To sum it up in one word: EVERYTHING!

That personal or college project that you think is useless may contain some programming concept or technique that a company is looking for.

Did you take a complementary programming course where you had to develop a project? Post it on GitHub. Do you have a personal project under development, post it too.

Not only will your code be visible to the world, but people can also help you develop it.

If you are already a programmer and develop for a company, you will probably not be able to publish your code. In this case create simple projects with the technology and methodology you are using and post them on GitHub, describing everything you have done.

GitHub's README

An important element of your projects that does not always get enough attention is the README file.

The README is the first impression of your work. Always have one at the root of the project. A good README is one that contains a good description of the purpose, where and how to use it, list of features, dependencies to work with. Examples of use will be a plus.

Remember that the README is meant to be a summary, not a documentation of the project. For documentation, you can use GitHub’s own Wiki.

Using licenses

Don’t forget to set a license for your project. You may miss opportunities if you do not have a license defined. The Choose a License website can help you define which license to adopt.

To apply a license to your project just create a file with the name LICENSE and paste the exact license content into it. Change it only if the license has spaces to be filled in with your data.

GitHub will automatically identify the license and add a small icon of it at the top of your project. If this does not happen, please revise the file.

Conclusion

That’s it for today. Now you know a little more about GitHub and how it works, don't forget to explore it and try things out on your own, because as the saying goes: "practice makes perfect".

Thanks for reading! Follow me in this platform to read more development content. Have a great day, see you soon! 👋

Top comments (0)