# How To Create A Pull Request On GitHub

Hey dev 👋, probably it's going to be the first time you make your own pr and contribute to open source.

So, you know how to use git. You have a GitHub repo and can push to it. All is well. But how the heck do you contribute to other people's GitHub projects? Read My Top Git Commands for every developer  [here](https://blog.octachart.com/top-10-git-commands-for-code-newbies) :

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638368848637/UMPjl05gf.png)
My first was sometime back when I edited documentation of DailyDotDev and later did I find out that I was the first contributor to their official docs and won a t-shirt worth 30$ from their swag store!


### Steps Involved 🚀 :

#### 🔹 Find a project you want to contribute to:  

For purposes of hands-on, I have created a repo on my GitHub and I have set it to the public containing some python code,  feel free to use that, I will be monitoring all merge requests:

Testing  [Repo](https://github.com/Ronlin1/Testing_PRs) : 

#### 🔹 Fork it

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638364233075/0_R3zt6te.png)
After firing that's what will be showing in your github

#### 🔹 Clone it to your local system

```
git clone https://github.com/UGTechGeeks/Testing_PRs.git
``` 

#### 🔹 Navigate to your local repository
``` 
cd Testing_PRs
``` 

#### 🔹 Make a new branch: Use any branch name you want:
``` 
git checkout -b "branch2"
``` 

#### 🔹 You will see this: 
``` 
Switched to a new branch 'branch2'
``` 

#### 🔹 Make your changes
With your favourite code editor, add anything in my ``` test_pr.py```  file: Could be a comment.

#### 🔹 Back to the terminal: Check Status

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638365272818/ZNwfb5z1Z.png)

#### 🔹 Add & Commit:
``` 
git add .
git commit -m "added a comment"
``` 

#### 🔹 To push back to your repo:
```  
git push --set-upstream origin branch2
``` 

#### 🔹 Click the Compare & Pull request button on Github
This will automatically pop up after pushing your changes

#### 🔹 Click Create pull request to open a new pull request
You can add comments and meaningful ones to describe your changes:

If you happen to get any errors: consider reading <br>
🔹GitHub  [Docs](https://docs.github.com/en/pull-requests) 

The changes and branch will reflect on my side and I will merge to main, after that you can delete the branch since i already merged your request.

Congratulations on making your first open-source contribution! 🎉

Now Go Contribute More: >>>

If you enjoyed reading, consider subscribing and reacting to this with love by sharing, commenting and any criticism is much welcome.

🔹Follow me on  [Twitter](https://twitter.com/intent/follow?screen_name=AfroBoyUg):

**Ronnie Atuhaire**

 
