Speeding Up Merge Time: Checklist for Effective Pull Request

Sanket Borade
6 min readDec 31, 2022

--

Are you new to working with version control systems like Git? Are you planning to contribute in open-source development? If so, you may have heard the term “pull request” thrown around multiple times for sure. But aren’t quite sure what it means? Don’t worry! I’ve got you covered.

Not just that, in this blog we’ll also go over the steps involved in creating a pull request and some amazing tips for making sure your request is reviewed and merged QUICKLY.

Soo, what exactly is a Pull Request?

Pull requests are commonly used in open-source projects. It is a feature in version control systems such as Git that allows a developer to submit changes they have made to the codebase. The repository maintainer can then review and discuss the changes with the developer and ultimately decide whether to merge the changes into the main branch of the repository or not.

Now, let's dive into creating your first pull request.

Don’t worry! It’s not that hard.

Step-by-Step Guide to Creating a Pull Request

  1. Clone Repository:
    Make sure you have a repository cloned to your local machine. If you don’t have the repository cloned yet, you can do so by using the git clone command.
git clone

2. Create a new branch in your local repository. You can do this by using the git branch command, followed by the name of the new branch.

git branch ‘new-branch-name’

3. Checkout the new branch. You can do this by using the git checkout command, followed by the name of the branch.

git checkout ‘new-branch-name’

4. Make changes:
Make the desired changes to the code in the new branch. You can edit the files directly in your code editor. Use the following commands to stage and commit your changes respectively.

git add
git commit -m "commit message'

5. Push the changes to your remote repository:
You can do this by using the git push command, followed by the name of the remote and the name of the branch.

git push origin branch-name

6. Go to the repository’s page on the hosting service (such as GitHub) and click on the “Compare & pull request” button. This will open a form where you can enter a title and description for your pull request. Make sure to check out to the branch properly using the arrow as shown in image below.

Compare & pull request

7. Review the changes that you have made and make sure they are correct. Add descriptive title and description to pull request.

8. Submit the pull request by clicking the “Create pull request” button. The repository maintainer will then be notified of the pull request and can review the changes.

Create pull request

9. If the repository maintainer approves the changes, they will merge the pull request into the main branch of the repository. If they have any feedback or suggestions for changes, they may request that you make additional changes before the pull request is merged.

Voila! You have just created a pull request!

That’s all about the technical part but don’t forget to follow this checklist to make sure your pull request is reviewed and merged quickly.

Section 3: Checklist for Creating Effective Pull Requests

  1. Read the documentation carefully:
    First and foremost, read the README.md and CONTRIBUTING.md carefully. This is your first step towards knowing the project, it’s setup and requirements. This helps in making a great pull request eventually.
  2. Communicate well:
    Make sure to ask your doubts and keep taking the feedback from the project maintainers frequently without any hesitation. Healthy communication leds to faster development and review process.
  3. Always, ALWAYS fetch the changes:
    Make sure that your changes are based on the latest version of the codebase. A lot of new contributors forget to fetch the changes which result in Merge Conflict.
  4. Follow the project’s coding style:
    Many projects follow a particular coding style guide and formatting conventions for the code. Be sure to follow it.
  5. Use a descriptive and clear title:
    Write a clear and concise title and description for your pull request. This will help the repository maintainer and other reviewers understand what changes you have made and why they are important. Avoid using vague or generic titles like “Updates” or “Changes.”
  6. Multiple changes? Split them into separate pull requests:
    Keep the pull request small and focused. If you have made multiple changes, consider splitting them into separate pull requests.
  7. Use Draft Pull Requests Feature:
    Create draft pull requests to discuss and review the potential changes with other collaborators. It can be merged, when it is marked ready. Creating draft pull request allows effective communication of multiple contributors and helps the maintainer to know your progress so far. It can be very helpful in hard issues.
Use Draft Pull Requests Feature

8. Document Your Code Precisely:
Make sure your code is well-documented. This includes adding comments to explain what your code does and why it is necessary.

9. Add tests to your code:
This will help ensure that the changes you made are reliable and will not break the codebase in the future.

10. Use descriptive commit messages:
Include relevant pictures/videos of changes, whenever possible. This will help the repository maintainer and other reviewers understand whether the changes are reliable and have been adequately tested.

11. Test your changes:
Before submitting your pull request, make sure to thoroughly test your changes to ensure that they are working as intended.

12. Be open to feedback & changes:
If the repository maintainer or other reviewers have feedback or suggestions for changes, make sure to address their concerns and make the necessary changes in a timely manner.

13. Be respectful, always.
Being unprofessional and disrespectful in your responses to code review. Even if you disagree with a suggestion, it is important to remain courteous and respectful in your responses.

… aaand done!

By following these tips, you can increase the chances of your pull request being accepted and make the review process smoother and more efficient.

Thats all for now. I hope you learned something from this blog. Feel free to hit me on Twitter! Also, do check out my repositories on GitHub and don’t hesitate to reach out to me if you would like to work on any of my existing projects or think I would be a good fit in your project.😁

Ciao. See you in the next one. 😇

People are also reading:

1. How to use GitHub Gists in the Technical blog posts
2. Enormous benefits of contributing to open projects
3. The Art of Google Search as a developer
4. Web3 Power Players: The Top DAOs and Communities for Learning and Engaging with Web3

--

--

Sanket Borade
Sanket Borade

Written by Sanket Borade

Web Developer who loves to write and design

No responses yet