How To Create a Great Pull Request in Just 5 Steps

What makes a great pull request?

Xuan-Gieng (Jasper) Nguyen
Better Programming

How to create a great pull request
Photo by Yancy Min on Unsplash

First of all, congratulations! You have come this far. Creating pull requests is the last step to propose your code to the code owners as well as other contributors.

It is really important to have a great pull request as it would help the reviewers to better understand and learn from your delivered code. For that reason, here are the five steps you could apply to create your next better ones.

1. Branch

Branching means you diverge from the main line of development and continue to do work without messing with that main line.

That way, Git branches are incredibly lightweight, making branching operations nearly instantaneous, and switching back and forth between branches is generally just as fast. — Git document.

A new branch should be created from the latest code of its destination branch from upstream. This means, at the point of branching, the local branch’s HEAD commit must be the same as the upstream branch’s HEAD commit.

It will help to make the history of commits in the upcoming pull request clean. In order to do it, if you are using Git command, you could follow these steps:

git fetch --all #1
git checkout…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Responses (3)

What are your thoughts?

Great tutorial!!

--

It is a very useful article, especially branches naming strategy.
Thanks

--