Tasnim Zotder

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

Author: Tasnim Zotder
GitHubProgramming

Git - Understanding the Basics

Git is a version control system for tracking changes in files and coordinating work among multiple people.

  • Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
  • Git is a distributed revision control system, meaning that changes are stored in a central repository and can be accessed from any computer in the world.

Installing Git

1. On Windows

  1. Download the Git for Windows installer from here.
  2. Install the Git for Windows installer

2. On Linux

  1. Open a terminal and type
sudo apt update
sudo apt install git

Configure Git

Open a terminal and type,

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

To verify that your Git configuration is correct, open a terminal and type,

git config --list

This will show you the current configuration.

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

GitHub is a code hosting service for version control using Git.

Steps to make a Pull Request

1. Select a repo on GitHub

There are lots of repos on GitHub. You can search and find the repo you want. Choose the repo you want to pull requests from.

2. Fork the repo to your own account

Fork

3. Clone the repo to your local machine

Clone

Copy the HTTPS clone link and paste it in your terminal. The link is like https://github.com/<USERNAME>/<REPO_NAME>.git

git clone <COPIED_LINK>

4. Open the repo in a code editor (for example, VS Code)

code <REPO_NAME>

5. Change, Add, and Commit your changes

Make some changes to the repo. After that, add all the changes you made to the repo and commit them.

git add .
git commit -m "Added some changes"

Push your changes to the remote repo.

git push origin main

6. Open a pull request

initiate PR

confirm the changes

PR description