Skip to content
  • Home
  • About the Blog
  • About the Author
  • Sitemap

Abdur Rosyid's Blog

Just a few notes on mechanical engineering and robotics

Pull Request on Github

June 9, 2025 by Abdur Rosyid

If you want to contribute to someone’s repo on Github, you can suggest your modification to the repo’s code by creating a Pull Request (PR). Before modifying the code, it is a recommended practice to fork the original code to your own Github account and subsequently make a new branch of the repo in which your will perform modification. To do modification to the repo, you can do it directly on the browser (on Github) if the modification is simple. If you are going to have a major modification, you typically will 1) clone the repo from your Github account to your local machine, 2) modify the code in your local machine, and 3) push the modified repo back to your Github repo.

The steps to make a Pull Request by modifying the repo directly on your own Github repo:

Step 1: Sign in to your Github account.

Step 2: While you are logged-in on Github, visit the repo you want to contribute and fork it to your own account. This is basically copying the repo to your own Github account.

Step 3: When you are to select between “Commit directly to the main branch” and “Create a new branch for this commit and start a pull request”, select the latter. Make sure to give a meaningful name to the new branch, for example: “fix/updated_file1”.

Step 4: Make modification to the code.

Step 5: Make Pull Request in your own Github repo. On the top side, make sure that the head repo is your current, new branch and the base repo is your main branch. Specify the PR by adding meaningful title and description of the PR.

Step 6: Merge in your own Github account.

Step 7: In the original repo (not in your Github acccount), create a Pull Request. On the top side, make sure that the head repo is the main branch from your own Github repo and the base is the main branch of the original repo. Add a meaningful title and description of the Pull Request.

The steps to make a Pull Request by modifying the repo on your local repo:

Steps 1 and 2: the same like in the above.

Step 3: Clone the repo from your remote repo. Use “git clone” to do this.

Step 4: In your local repo, create a new branch of the repo. You can use:

git checkout -b (new-branch-name)

Step 5: Make modification to the code.

Step 6: Bring the modified repo to the staging area using “git add” and subsequently make commit using “git commit -m “Meaningful comment””.

Step 7: Push the modified local repo back to the remote repo. You can use “git push -u origin (new-branch-name)”.

Step 8: Create Pull Request in your own Github repo. On the top side, make sure that the head repo is your current, new branch and the base repo is your main branch. Specify the PR by adding meaningful title and description of the PR.

Step 9: In the original repo (not on your Github acccount), create a Pull Request. On the top side, make sure that the head repo is the main branch from your own Github repo and the base is the main branch of the original repo. Add a meaningful title and description of the Pull Request.

After the Pull Request is created, the maintainer(s) of the original repo will review the Pull Request. If the maintainer(s) agrees, they will merge your modified branch with the original branch.

Post navigation

Previous Post:

Basics of Git and Github

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • STEM 101
  • Robotics
  • Kinematics
  • Dynamics
  • Control
  • Robot Operating System (ROS)
  • Robot Operating System (ROS2)
  • Software Development
  • Mechanics of Materials
  • Finite Element Analysis
  • Fluid Mechanics
  • Thermodynamics

Recent Posts

  • Pull Request on Github
  • Basics of Git and Github
  • Conda vs Docker
  • A Conda Cheat Sheet
  • Installing NVIDIA GPU Driver on Ubuntu

Archives

  • June 2025
  • July 2021
  • June 2021
  • March 2021
  • September 2020
  • April 2020
  • January 2015
  • April 2014
  • March 2014
  • March 2012
  • February 2012
  • June 2011
  • March 2008
© 2026 Abdur Rosyid's Blog | WordPress Theme by Superbthemes