Git Github Tutorial 10: What is Pull Request?
Key Takeaways
Demonstrates how to create and merge pull requests in Git
Full Transcript
hello friends in this tutorial we are going to see what is pull request and github on github owner can share his code with others now other person can look at the code and he can make changes to fix a bug or add an enhancement and then send a request to the owner to pull or merge his core changes into honors repository this request is called a pull request let us understand this by using this picture these four people on this github repo let's say this is the repository for node.js which is an open source project this guy here his name is Tom unless it Tom looks at node.js code base and then he realizes that he needs to fix a some bug or make sanim and enhancement now since this is an open source project he can copy the project into his local github private repository then pull the project on his local computer make core changes so this blue color indicates the coaching that he made and then he can push that into his own private github repository after that he can create a pull request or asking owners to pull his core changes into owners repository when this request is sent owners can see the difference which is this blue color line code change and they can either comment or they can just accept the request directly so pull request allows you to start a conversation around that code change between the owners and between the code contributor so this promotes of collaboration and pull request is one of the reasons why github has become very popular ok now let's look at the demonstration so let's say we have these two users Brad and Angelina are who not only collaborate as a wife and husband or actors but they want to do a collaboration when it comes to programming as well so this guy has this code repository called hungry and he has all this code now if you look at the URL that is Brad 27th oh so this is owned by Brad ok now Angelina looks at this codebase and she wants to let's say make some changes here so she will then go and so the person right here is Angelina so she will open odd this repository here so as you can see here the signed-in user is Angelina but she has opened the repository from Brad and she can click on this fork button to copy Brad's code into her own private repo ok so now she has Corbis copied and now you can see that is the links is Angelina ok so typically she will pull the if the code changes are huge civil pull this code base into her local computer and make code changes run the code and do some test verified and once things look ok she will push it here to her own private repository but since this is a tutorial I am going to make code change directly on this web website so if you don't know our github allows you to edit code directly on the website so I will just click on edit file and make a code change here and I will and hungry equal to Y so she wants to add Y as a valid input okay so let me make this bigger so that you can see what Co change I made so she just added this line okay and then she can commit her changes you can say okay added Y as a valid answer and commit changes so once you do that and if you go to your commits you can see the difference here by clicking here so it says you added this thing here okay now it is the time to create a pull request so Angelina is ready with her chord changes now she wants to merge these chord changes here in to Brad's repository so for that she will click on pull request here okay and then let's see so here there is a button new pull request so click on new pull request so here it will tell you from where you are merging to which repository so your base the repository is Brad 27 so this says that from Angelina hungry a code repository master branch I want to merge into brass repository okay and it allows you to see the difference so if I am Angelina Angelina can see that I am asking to add this coaching okay so I'll click on create pull request here you can add some meaningful comment here and then just say create pull request so at this point the Corps from here it's not merged here okay so now Angelina is kind of waiting for Brad to review his whole code okay so if I am Brad I will are in this area if I just refresh my webpage I will see this little notification okay and this notification is telling me that let me maximize the screen so this notification is not telling me that uh someone has sent me a pull request so I will click here and if I want to see the actual cogeco changes I can go here in file chain and I can see the code changes now I'm Brad let's say and I like this call change but then one thing is I want to add capital y as an input so I will put a comment saying that a good change I like it can you also add capital y ah so then you will put your comment here and once you put your command now let's go back to Angelina because the ball is in Angelina's code now okay and once she opens this pull request see will see a comment from Brad twenty-seven saying that good change I like it can you also add y ok so now what Angelina will do is she kind of agrees with bad so she will go ahead and add Y as well so let's see so here I'm in this pull request ok just a second okay sorry so I'm looking at Brad scores okay I shouldn't be so this is bad suppository okay let me go back so Angelina should be looking at her repository which is hungry okay so here what she will do is she will add capital y as a valid input so we'll say okay and hungry equal to capital y then that also is a valid input added capital y into list of valid answers okay she will commit her core change and let's look at the full request okay so the pull request will be here okay so now you can see here that there is added wine to list of valid answers and if you look at this files change now I have both of this available in my pull request okay so if I am bread I will also again get a notification saying that Angelina Argosy there is a notification here saying that there is some update on this pull request so you can view the Jean that was made last time or view you can view all the changes so now this change kind of looks okay to me and I'm fine merging it into my depository so what I will do is I will go here and I will click on merge button okay eventually you will click on merge button to merge it so now what happened is in brass repository I have now d score changes so this completes the cycle and now I have Brad and Angelina both showing up as a decor contributor okay so that was just a nice quick demo of pull request they are extremely popular in open source world where there is a open source project and multiple people contribute to it okay and this whole model of pull request and sharing code is number one reason why github is so popular
Original Description
In this git github tutorial, we will learn what is pull request and step by step guide on how to create and merge pull request. Pull requests have become very famous as github popularity is touching the sky. It provides a way to contribute to other people's code.
Do you want to learn technology from me? Check https://codebasics.io/ for my affordable video courses.
Git Tutorial: https://www.youtube.com/watch?v=xAAmje1H9YM&list=PLeo1K3hjS3usJuxZZUBdjAcilgfQHkRzW
Machine Learning Tutorial With Python: https://www.youtube.com/watch?v=gmvvaobm7eQ&list=PLeo1K3hjS3uvCeTYTeyfe0-rN5r8zn9rw
Website: https://codebasics.io/
Facebook: https://www.facebook.com/codebasicshub
Twitter: https://twitter.com/codebasicshub
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from codebasics · codebasics · 49 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
▶
50
51
52
53
54
55
56
57
58
59
60
Python Tutorial - 1. Install python on windows
codebasics
Python Tutorial - 2. Variables
codebasics
Python Tutorial - 3. Numbers
codebasics
Python Tutorial - 4. Strings
codebasics
Python Tutorial - 5. Lists
codebasics
Python Tutorial - 6. Install PyCharm on Windows
codebasics
PyCharm Tutorial - 7. Debug python code using PyCharm
codebasics
Python Tutorial - 8. If Statement
codebasics
Python Tutorial - 9. For loop
codebasics
Python Tutorial - 10. Functions
codebasics
Python Tutorial - 11. Dictionaries and Tuples
codebasics
Python Tutorial - 12. Modules
codebasics
Python Tutorial - 13. Reading/Writing Files
codebasics
How to install Julia on Windows
codebasics
Python Tutorial - 14. Working With JSON
codebasics
Julia Tutorial - 1. Variables
codebasics
Julia Tutorial - 2. Numbers
codebasics
Python Tutorial - 15. if __name__ == "__main__"
codebasics
Julia Tutorial - Why Should I Learn Julia Programming Language
codebasics
Python Tutorial - 16. Exception Handling
codebasics
Julia Tutorial - 3. Complex and Rational Numbers
codebasics
Julia Tutorial - 4. Strings
codebasics
Python Tutorial - 17. Class and Objects
codebasics
Julia Tutorial - 5. Functions
codebasics
Julia Tutorial - 6. If Statement and Ternary Operator
codebasics
Julia Tutorial - 7. For While Loop
codebasics
Python Tutorial - 18. Inheritance
codebasics
Julia Tutorial - 8. begin and (;) Compound Expressions
codebasics
Python Tutorial - 12.1 - Install Python Module (using pip)
codebasics
Julia Tutorial - 9. Tasks (a.k.a. Generators or Coroutines)
codebasics
Julia Tutorial - 10. Exception Handling
codebasics
Python Tutorial - 19. Multiple Inheritance
codebasics
Python Tutorial - 20. Raise Exception And Finally
codebasics
Python Tutorial - 21. Iterators
codebasics
Python Tutorial - 22. Generators
codebasics
Python Tutorial - 23. List Set Dict Comprehensions
codebasics
Python Tutorial - 24. Sets and Frozen Sets
codebasics
Python Tutorial - 25. Command line argument processing using argparse
codebasics
Debugging Tips - What is bug and debugging?
codebasics
Debugging Tips - Conditional Breakpoint
codebasics
Debugging Tips - Watches and Call Stack
codebasics
Python Tutorial - 26. Multithreading - Introduction
codebasics
Git Tutorial 3: How To Install Git
codebasics
Git Tutorial 1: What is git / What is version control system?
codebasics
Git Tutorial 2 : What is Github? | github tutorial
codebasics
Git Tutorial 4: Basic Commands: add, commit, push
codebasics
Git Tutorial 5: Undoing/Reverting/Resetting code changes
codebasics
Git Tutorial 6: Branches (Create, Merge, Delete a branch)
codebasics
Git Github Tutorial 10: What is Pull Request?
codebasics
Git Tutorial 7: What is HEAD?
codebasics
Git Tutorial 9: Diff and Merge using meld
codebasics
Difference between Multiprocessing and Multithreading
codebasics
Python Tutorial - 27. Multiprocessing Introduction
codebasics
Python Tutorial - 28. Sharing Data Between Processes Using Array and Value
codebasics
Git Tutorial 8 - .gitignore file
codebasics
Python Tutorial - 29. Sharing Data Between Processes Using Multiprocessing Queue
codebasics
Python Tutorial - 30. Multiprocessing Lock
codebasics
Python Tutorial - 31. Multiprocessing Pool (Map Reduce)
codebasics
What is code?
codebasics
Python unit testing - pytest introduction
codebasics
🎓
Tutor Explanation
DeepCamp AI