A Beginner’s Introduction to GitHub

Omkarpro
3 min readNov 24, 2020

In this article, I won’t cover how to create a GitHub profile or how to use the terminal to make a Git commit. Instead, I will explain why using Git and GitHub every day is so important, especially for those of you who are learning to code.

What is GitHub?

GitHub can be seen as a cloud like Microsoft OneDrive, but it allows the programmers to share codes, search codes, download codes, and like codes. It is similar to what we do on Facebook, just the contents are different.

Why are Git and GitHub so important?

If you are learning to code, chances are your most important goal is to eventually get a job as a software developer. In that case, the answer is very simple:

Learning Git and GitHub is incredibly important because 99% of the companies that can hire you will use Git and GitHub. Therefore, learning how to work with Git and GitHub make you more hireable and help you differentiate yourself from more junior developers

“Why are Git and GitHub so important for companies?”

The short answer is that Git allows teams to efficiently and effectively contribute code to the same project in an asynchronous way. This empowers teams to collaborate better and thus allows them to solve bigger and more complex problems.

How to Start With Git and GitHub with 3 simple Step

1. Create a Git repository for every new project

This first rule is quite straightforward, but making a habit out of it is very important. Every time you start working on something new — your portfolio, a learning project, a solution to a coding challenge, and so on — you should create a new Git repository and push it to GitHub.

Quick Note: if using the terminal becomes a hassle and makes you less likely to use Git for all your projects, consider using the GitHub Desktop app.

Basic Workflow of a GitHub Repository

2. Create a new branch for every new feature

Let’s say you are working on your portfolio and you want to build a new “Contact me” section/component. Create a dedicated branch for this new feature, give it a meaningful name (e.g. contact-me-section), and commit all the code to that specific branch.

i.e. the master. The master branch is the main branch on which your final code is supposed to exist.

3. Use Pull Requests to merge code to Master

Every repository starts with a master branch by default. You should never push changes directly to the master branch. Instead, you should use feature branches as described above, and open a new Pull Request to merge the feature branch code with the master branch code.

In a real job, someone will look at your Pull Request and do a code review before approving it. After your code has been reviewed, tested, and approved, your reviewer will give you thumbs up for you to merge the Pull Request, or they will directly merge your pull request.

if you liked the article and want to get in touch, drop me a message below or you can find me on LinkedIn.

--

--

Omkarpro

I am Computer Science student who is passionate about New technology