# Introduction to GitHub

Before we deep dive into all of the various Git commands, let's quickly get familiar with GitHub.

Git is essentially the tool that you use to track your code changes, and GitHub, on the other side, is a website where you can push your local projects to.

This is essentially needed as it would act as a central hub where you would store your projects and all of your teammates or other people working on the same project as you would push their changes to.

### GitHub Registration

Before you get started, you would need to create an account with GitHub. You can do so via this link here:

* [Join GitHub](https://github.com/join)

You will get to the following page where you will need to add your new account details:

![Sign up to GitHub Page](https://imgur.com/iebnKjZ.png)

### GitHub Profile

Once you've registered, you can go to https://github.com/YOUR_USER_NAME, and you will be able to see your public profile where you can add some information about yourself. Here is an example profile which you can check: [GitHub Profile](https://github.com/bobbyiliev)

![GitHub Profile](https://imgur.com/rZgIaOy.png)

### Creating a new repository

If you are not familiar with the word repository, you can think of it as a project. It would hold all of the files of your application or website that you are building. People usually call their repository a repo for short.

To create a new repository on GitHub, you have to click on the `+` sign on the top right corner or click on the green `NEW` button in the top-left where repositories are mentioned and then click on the `New Repository` button:

![Create new GitHub repository](https://imgur.com/HAANHiz.png)

After that, you'll get to a page where you can specify the information for your new repository like:

* The name of the project: Here, make sure to use something descriptive
* Some general description about the project and what it is about
* Choose whether you want the repository to be Public or Private

![New repo details](https://imgur.com/T0UKCES.png)

Once you've added the necessary information and hit the create button, you will get to a page with some instructions on how to push your local project to GitHub:

![GitHub push local project](https://imgur.com/HXRQvMu.png)

We will go over those steps more in-depth in the next few chapters.

### Public vs. Private repositories

Depending on the project and whether or not it is open source, you can set your repository to be **public** or **private**.

The main difference is that, with a public repository anyone on the internet can see that repository. Even though they'll be able to see the repository and read the code, you will be the maintainer of the project, and you will choose who can commit.

Whereas a private repository will only be accessible to you and those you have invited.

Public repositories are used for open source projects.

### Add colaborators to your projects

Colaborators are the people who actively work on the project, for example if a company has taken up a project for which some x, y, z are supposed to work, so these people are added as a colaborator by the the company.

Select a GitHub repository and navigate to the settings tab, in the left side menu bar there is an option `Manage access`, there you can add the collaborators for your project.

### The README.md file

The `README.md` file is an essential part of each project. The `.md` extension stands for Markdown.

You can think of the `README.md` file as the introduction to your repository. It's beneficial because while looking at someone's repo, you can just scroll down to their README file and have a look at what their project is all about.

And it is crucial that your project is properly introduced. Because if the project itself isn't introduced properly, no one will spend their time helping to improve it and try to develop it further.

That's why having a good README file is necessary and it shouldn't be overlooked, and you should spend a considerable amount of your time on it.

In this post, I am going to share some tips with you about how you can improve your README file, and hopefully, it will help you with your repositories.

For more information, make sure to check out this post on [how to write a good README.md file](https://devdojo.com/bobbyiliev/quick-tips-for-writing-a-good-readme-file).

## GitHub Stars

Let's start by answering the question why do we star a repository?

Firstly people star a repository for later use or maybe just to keep track of it. I would basically star a repository because I might be needing it for later use.

For instance repository like the [introduction-to-git-and-github-ebook](https://github.com/bobbyiliev/introduction-to-git-and-github-ebook) is essential because you might get stuck on Git as a beginner and you can just simply refer to it easily.

And secondly its used to show support to the creator and the maintainers of the repository.

So lets use this eBook [introduction-to-git-and-github-ebook](https://github.com/bobbyiliev/introduction-to-git-and-github-ebook) as an example to actually star a repository.

You have visit GitHub and find the [introduction-to-git-and-github-ebook](https://github.com/bobbyiliev/introduction-to-git-and-github-ebook) reposotory via the search, or access the repository directly at: 

[https://github.com/bobbyiliev/introduction-to-git-and-github-ebook](https://github.com/bobbyiliev/introduction-to-git-and-github-ebook)

![Github repository example](https://user-images.githubusercontent.com/53145644/136269043-0a36d5a8-cc0b-4793-808e-ae9c6318e899.PNG)

Now while you are on the repository page on GitHub, at the top of the page where the `USERNAME/THE REPOSITORY NAME` lies, you will find some couple of icon:

![TopBar](https://user-images.githubusercontent.com/53145644/136269993-95e3909b-dc9e-4ff0-91b9-470c991cf66f.PNG)

Click on the star icon and you have successfuly starred the project.

Whenever you like a project and want to suport the creator, make sure to click star the repository! Just like you would enjoy a video on YouTube and hit the like button.
