#3 First Pull Request

#3 First Pull Request

A Tale

Jack - Made a project on web development and posted it on Github you want to add some features to it.

You - Make the changes you want and send him a pull request he reviews it and adds it to the project.

Pull request - When you have made some changes to someone's project you send that person a pull request he/she reviews and adds it to their project.

It will take us 7 simple steps to make our first pull request.

Let's Begin !!!!

Prerequisites:

Note: If this is your first time using git then download and install .NET Framework 4.8 as well and restart your computer. NET Framework 4.8

I have made a repository on Github to which we are going to contribute.

Step 1 - Fork

  • Firstly we fork the repository.

fork.PNG

Step 2 - Clone

  • Once you have forked the repository the project will be shown on your account.
  • Copy the link for cloning it from your account.

clone.PNG

  • Open Git Bash

Firstly

  • enter your credentials in git.
  • git config --global user.name "your username"
  • git config --global user.email "youremail@example.com"

configu.PNG

  • If you are not on desktop type cd Desktop (this means we are now on desktop)

deskk.PNG

  • clone it.

clone 2.PNG

  • Now the project is cloned on your computer locally.

Step 3 - Branch

  • We have to go to the folder we just cloned and to do that we use the command cd and the yellow color shown here specifies the path. branch.PNG

  • Initially, we are on the main branch but it's always better to create a branch to work on.

  • I am creating a branch called new-branch just for explaining but it's better to name it something which is meaningful.

branch 1.PNG

Step 4 - Changes

Let's make some changes

  • Go to the created folder on your desktop there is a file called index.html right click and open it with VS Code or notepad.
  • Add any fact that you like with your name and save the file.

fact.PNG

The Output :

output.PNG

  • You can check the changes you have made.

status.PNG

Step 5 - Commit

  • We add the changes to new-branch.

add.PNG

  • now we commit it with a message which specifies what we just did

commit.PNG

Step 6 - Push

  • We first check the remote name in our case its origin and then push the changes to Github.
  • Then a dialog box appears click on sign in with Github and give access.

    push.PNG

Step 7 - Pull Request

  • If you go on your Github profile you will see something like this click on it.

pr.PNG

  • You leave a comment explaining what you did then click on create pull request.

prr.PNG

Done, with that you just made your first pull request.

As soon as your pull request is merged you will get an email.

I will merge your fact and display it on this website

If you learned something new today why not connect with me?

Twitter Github Linkedin