DEV Community


GitHub: An Intro

Dev. I love dogs, cookies, and learning new things.
Updated on ・3 min read

I had no exposure to GitHub until November 2018, when I started school. I’d heard of it before, and I’d been to the website, but I had never used it or had any reason to use it.

Since then I’ve had to learn some new vocabulary and how to get my code from here to there. I have also had to google how to set up a repo and use other commands way too many times, so I’m going to start collecting what I’ve learned so I don’t have to hunt again and so you can maybe save some time too.

In this first post, a few basics: What’s GitHub? What’s a repository? What’s on your profile?

GitHub: What is it?

GitHub is a “web-based hosting service for version control using Git.” On GitHub, you can save projects you are working on, via creating repositories, and use this to keep track of changes, work with other developers, and make your code available to others.

A repository (repo) is a place to keep things. On GitHub, a repo is where your project lives. You can create as many repositories as you need for as many different projects. Repositories can be public and available for everyone to view, or private, only for you.

Repositories on GitHub are useful for version control. Code changes all the time. You can decide to approach something differently, or add or remove columns from a table in your database, or find a typo. Sometimes you make a change that fixes one issue but breaks several others. Without keeping track of all of these changes, things can quickly end up a big mess (I believe the technical term is “FUBAR”).

GitHub allows you to pause at any moment in your work and tell your repository about the changes you have just made. You commit the changes to your repository along with a message describing the change. Doing this not only allows others to follow the development of your code, but these pauses allow you to go back to an old version of your work if you do happen to make a mess.

Your Profile

To use GitHub, you need to create an account. You’ll need a username, your email address, and to create a password. Your account will allow you to set a profile picture, display contact information, and set a short bio.

You will see an overview page, which gives an idea of how active you have been and shows repositories you have chosen to pin to your profile. By pinning them, these repositories are there on the overview page eliminating the need for someone to go look through all your repositories to find them.

Your repositories page is where your projects all live. Under the name of the repository, you’ll see the language or languages used, if there is a license for the code, whether forks have been made, and when it was last updated.

“A fork is a copy of a repository.” Forks are used to let you work on a project without affecting the original version. This is helpful if the original project is not yours and you will be proposing changes to someone else. To submit your changes is called making a pull request. This tells the project owner about your work, which they may choose to “pull” into the original.

Next time:

We’ll talk about repositories (how to make one, how to clone one).

Discussion (0)