featured_img
Git & GitHub β€” Open a Pull Request [As fast as possible]
Oct 12, 2020 πŸ• 3 MIN READ
So what is git? A confusing one, isn’t it? Off course yes, until we learn the basics.

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, yummy 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 learn the combination of the spices of the new dish and started modifying that.

In the 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 backup and try the previous combinations is code versioning.

Installing Git

a. Installing Git on Windows

For windows, the official release is available for download on Git website β€” https://git-scm.com/

b. Installing Git on Linux

sude apt update
suco apt install git

c. Installing Git on macOS

Let's configure git -

git config --global user.name "<YOUR_NAME>"
git config --global user.email "<YOUR_EMAIL>"

Type the following command to verify the configuration -

git config --list

This will output as follows -

user.name=<YOUR_NAME>
user.email=<YOUR_EMAIL>

GitHub - The Hub for our Codes

GitHub

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 repos on GitHub. If you are searching for beginner level projects, you can go for β€˜good-first-issue’ or projects on your interest.

2. Fork the repo on your account

Fork

3. Clone the repo on your local machine

Clone

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

git clone <COPIED_LINK>

4. Open the 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 on the repository. After changing the 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 description and open a PR

πŸŽ‰πŸŽ‰πŸŽ‰ Congratulations. You just learn the basics of git and pull request


You can also read the article in πŸ‘‰ Medium.

;

Contents

  • Blog
  • YouTube

Personal

  • Portfolio
  • Projects
  • Education

github
twitter
linkedin
Β© Tasnim Zotder | 2021
🏑
Home
πŸ“
Blog
πŸ’‘
Portfolio