How to raise a Pull Request (PR) on GitHub

Pull Request (PR)
Written by DEL support01
Updated 7 months ago

1- Fork the repository 

   . Go to the repository you want to contribute to and click on the "Fork" button in the top right corner. This will create a copy of the repository under your GitHub account.

 2-  Clone the Forked repository

   . Go to your forked repository, click on the "Code" button, and copy the URL.

   . Open your terminal and run:

      - git clone [ REPOSITORY_URL]

      - cd [ REPOSITORY_NAME ] 

3- Create a new branch

       - git checkout -b [ BRANCH_NAME ]

4-  Make changes and commit 

    . Make your desired changes to the code in your local repository

     . Once you are done, stage the changes and commit them

        - git add .

        - git commit -m [ YOUR COMMIT MESSAGE HERE ]

5- Push changes to your Fork

        - git push origin [ BRANCH_NAME ]

6- Create a Pull Request (PR)

     . Go to your forked repository on GitHub

     . GitHub will recognize that you've pushed a new branch and will present a "Compare & pull request" button.

     . Click on the button, review your changes, and submit the pull request

7- Describe and submit the Pull Request (PR)

     . Give your pull request a title and a detailed description.

     . Click on the "Create pull request" button.

8- Discuss and iterate 

     . If the maintainers of the original repository request changes, make the necessary updates in your branch and push the changes. The pull request will be automatically updated.

     . Keep the conversation going in the pull request thread

Did this answer your question?