Git & GitHub — Open a Pull Request [As fast as possible]

So what is git? A confusing one, isn’t it? Off course yes, until we learn the basics.
featured image
Tasnim Zotder
Oct 12, 2020
⏱️ 3 Minutes

Git - Understand the Basics

So, what is git? A confusing one, isn’t it? Off course yes, until we learn the basics.

Git is like our own brain when we try to learn a new dish. Let’s assume Octocat loves cooking 👨‍🍳. One day he wanted to make a new dish, a delicious dish 😋. He collected a lot of spices. First, he cooked a dish with a combination of spices. The taste was okay 👌, so he remembered the combination. He tried another combination. But …. 😕 not tasty. So, he just simply remembered the previous combinations of good taste and started modifying that. One day his friends came and learned the combination of the spices of the new dish and started modifying that.

In technical term, git is a version control system with two main purposes — code backup and versioning. Remembering the combination of spices for the dish is code back up and trying the previous combinations is code versioning.

Installing Git

a. Installing Git on Windows

For windows, the official release is available for download on the Git website 👉

b. Installing Git on Linux

sude apt update
sudo apt install git

c. Installing Git on macOS

Let's configure git -

git config --global "<YOUR_NAME>"
git config --global "<YOUR_EMAIL>"

Type the following command to verify the configuration -

git config --list

This will output as follows -<YOUR_NAME><YOUR_EMAIL>

GitHub - The Hub for our Codes

GitHub is a code hosting platform for version control and collaboration.

Steps to make a Pull Request

1. Select a repo on GitHub

There are a lot of repositories on GitHub. If you are searching for beginner-level projects, you can go for ‘good-first-issue’ or projects of your interest.

2. Fork the repo on your account


3. Clone the repo on your local machine


Copy the https link and copy the command. It's like -<USERNAME>/<REPO_NAME>.git

git clone <COPIED_LINK>

4. Open the repository in a code editor (eg VS Code, Atom)

git cd <REPO_NAME>
code .

Here code is used to open the directory in VS Code.

5. Change, Add, Commit and Push

Make some valid changes to the repository. After changing you need to add those changes to git —

git add .

After that, make a commit for the changes -

git commit -m "COMMIT_MESSAGE"

Push the changes to GitHub

git push

6. Open a Pull Request

Pull request is the way we propose our changes to accept in the parent repository.

initiate PR
confirm the changes
write a description and open a PR

🎉🎉🎉 Congratulations. You just learned the basics of git and pull request

You can also read the article in 👉 Medium.

  • Blog
  • YouTube
  • Portfolio

© Tasnim Zotder | 2022