DEV Community

Cover image for The SIMPLEST way to make a pull request ๐ŸŒฒโœ”๏ธ
Luke Garrigan
Luke Garrigan

Posted on • Edited on

The SIMPLEST way to make a pull request ๐ŸŒฒโœ”๏ธ

I'm sure many of you have done the following:

  1. Google: "How to make make a pull request"
  2. Cry when you see the long string of commands that need to be entered and memorised.

It doesn't need to be that complicated.

I myself have spent many years using the CLI making many, many mistakes. I just recently moved to GitHub desktop it is so much faster and just an all-round more pleasant experience.

Step 1 - Install GitHub desktop

Go to https://desktop.github.com/ and download the GitHub desktop. Once downloaded and installed I'd recommend having a little watch of this video to get up to speed with it โ€” it's definitely worth a watch:

Step 2 - Fork the repository you want to make the pull request to!

Go to the repository โ€” at the top right of the page, there should be a fork button!

Mock housing app

In this example, I am going to make a pull request to a friend's repository and just update their readme.md

Step 3 - Clone the forked repository using GitHub desktop

Clone the repository

Clone the repo clicking the button

Step 4 - Make and commit your changes

Commit the changes:
Commit the changes

Push the changes to your forked repository:
Push the changes

Step 5 - Make the pull request!

Go to your forked repo on Github and make sure your changes have been added:

Forked repo has been updated

Click New Pull Request:

Make the pull request

Check over the changes then click Create Pull Request!

Make the pull request button

Finally, wait for your beautiful code to be merged!

That's all there is to it, it's very simple and the GitHub desktop tool helps speed up the process โ€” it also helps in actually understanding what these bloody commands are doing!

I hope this helps, happy hacking!

Thank you, if you like my rambling check out my personal blogging site at https://codeheir.com/

This blog is sponsored by Code Canvases

Make your room come alive with the coolest programming/coding canvases on the market. codecanvases.com is the number 1 seller for programming prints with 100% exclusively designed canvases. Get them now whilst they're 20% off!!
[https://codecanvases.com/](https://codecanvases.com/)

Top comments (12)

Collapse
 
anthonywebdev profile image
Anthony R.

Better than GitHub Desktop you have GitKraken :D Available on Windows, Mac & Linux.

Good post by the way.

Collapse
 
lukegarrigan profile image
Luke Garrigan • Edited

ooh It looks really good, and a 3-way merge tool built-in! ๐Ÿš€ Thank you

Collapse
 
anthonywebdev profile image
Anthony R.

You're welcome ๐Ÿ˜‡

Thread Thread
 
lukegarrigan profile image
Luke Garrigan • Edited

I will say though, It's a little less beginner-friendly than Github desktop there are many, many more options for things which may be a little daunting for newcomers!

Thread Thread
 
anthonywebdev profile image
Anthony R.

Personally since a friend of me made me discovered GitKraken I am in love with it.
Before, I was commiting only with terminal commands, but I found the GUI way more convenient. It's easy to see the last commits, branches etc ...

Collapse
 
shostarsson profile image
Rรฉmi Lavedrine

I really love Gitkraken. Must say that I took it because of its Linux compatibility but it is my go-to Git client (when not using the CLI) because of all the features it has and the design that makes everything pretty clear.

Nevertheless, some VSCode add-on are pretty good as well.
Git File History => marketplace.visualstudio.com/items...
and
Git Graph => marketplace.visualstudio.com/items...

Collapse
 
chadkouse profile image
Chad Kouse • Edited

The GitHub hub command line tool is much simpler. github.com/github/hub

hub pull-request --no-edit -p -o -b master

Pushes your branch to remote (-p), makes the PR using your commit messages (--no-edit), asks to pull the changes into the master branch (-b master), and even opens it in the browser once done (-o).

Collapse
 
fabian_muema profile image
Fabian Muema

Thanks for this command. Been using hub but didn't know it can do that.

Collapse
 
iamkirillart profile image
Kirill

I think, you should add one step โ€” create branch for your commits. 1 branch โ€” 1 PR for 1 issue. It will be better, than a lot of commits in 1 PR with different issues.

Collapse
 
shadowwarior5 profile image
Konstantin Meiklyar • Edited

Nice post!
Isn't the easiest way is still to create in on GitHub from branch?

Collapse
 
schnipdip profile image
schnipdip

This is good! You can use the desktop app too. Since I work in Linux using the CLI is the best choice.

sudo git clone --single-branch -b Dev git@github.com:UserName/gitRepo.git

Collapse
 
seanmclem profile image
Seanmclem

I usually just make github PRs right on Github.com