Git Github Tutorial 10: What is Pull Request?

codebasics · Beginner ·📐 ML Fundamentals ·9y ago

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 Python Tutorial - 1. Install python on windows
Python Tutorial - 1. Install python on windows
codebasics
2 Python Tutorial - 2. Variables
Python Tutorial - 2. Variables
codebasics
3 Python Tutorial - 3. Numbers
Python Tutorial - 3. Numbers
codebasics
4 Python Tutorial - 4. Strings
Python Tutorial - 4. Strings
codebasics
5 Python Tutorial - 5. Lists
Python Tutorial - 5. Lists
codebasics
6 Python Tutorial - 6. Install PyCharm on Windows
Python Tutorial - 6. Install PyCharm on Windows
codebasics
7 PyCharm Tutorial - 7. Debug python code using PyCharm
PyCharm Tutorial - 7. Debug python code using PyCharm
codebasics
8 Python Tutorial -  8. If Statement
Python Tutorial - 8. If Statement
codebasics
9 Python Tutorial - 9. For loop
Python Tutorial - 9. For loop
codebasics
10 Python Tutorial -  10. Functions
Python Tutorial - 10. Functions
codebasics
11 Python Tutorial - 11. Dictionaries and Tuples
Python Tutorial - 11. Dictionaries and Tuples
codebasics
12 Python Tutorial - 12. Modules
Python Tutorial - 12. Modules
codebasics
13 Python Tutorial - 13. Reading/Writing Files
Python Tutorial - 13. Reading/Writing Files
codebasics
14 How to install Julia on Windows
How to install Julia on Windows
codebasics
15 Python Tutorial - 14. Working With JSON
Python Tutorial - 14. Working With JSON
codebasics
16 Julia Tutorial - 1. Variables
Julia Tutorial - 1. Variables
codebasics
17 Julia Tutorial - 2. Numbers
Julia Tutorial - 2. Numbers
codebasics
18 Python Tutorial - 15. if __name__ == "__main__"
Python Tutorial - 15. if __name__ == "__main__"
codebasics
19 Julia Tutorial - Why Should I Learn Julia Programming Language
Julia Tutorial - Why Should I Learn Julia Programming Language
codebasics
20 Python Tutorial  - 16. Exception Handling
Python Tutorial - 16. Exception Handling
codebasics
21 Julia Tutorial - 3. Complex and Rational Numbers
Julia Tutorial - 3. Complex and Rational Numbers
codebasics
22 Julia Tutorial - 4. Strings
Julia Tutorial - 4. Strings
codebasics
23 Python Tutorial -  17. Class and Objects
Python Tutorial - 17. Class and Objects
codebasics
24 Julia Tutorial - 5. Functions
Julia Tutorial - 5. Functions
codebasics
25 Julia Tutorial - 6. If Statement and Ternary Operator
Julia Tutorial - 6. If Statement and Ternary Operator
codebasics
26 Julia Tutorial - 7. For While Loop
Julia Tutorial - 7. For While Loop
codebasics
27 Python Tutorial  - 18. Inheritance
Python Tutorial - 18. Inheritance
codebasics
28 Julia Tutorial - 8. begin and (;) Compound Expressions
Julia Tutorial - 8. begin and (;) Compound Expressions
codebasics
29 Python Tutorial - 12.1 - Install Python Module (using pip)
Python Tutorial - 12.1 - Install Python Module (using pip)
codebasics
30 Julia Tutorial - 9. Tasks (a.k.a. Generators or Coroutines)
Julia Tutorial - 9. Tasks (a.k.a. Generators or Coroutines)
codebasics
31 Julia Tutorial - 10. Exception Handling
Julia Tutorial - 10. Exception Handling
codebasics
32 Python Tutorial  - 19. Multiple Inheritance
Python Tutorial - 19. Multiple Inheritance
codebasics
33 Python Tutorial - 20. Raise Exception And Finally
Python Tutorial - 20. Raise Exception And Finally
codebasics
34 Python Tutorial - 21. Iterators
Python Tutorial - 21. Iterators
codebasics
35 Python Tutorial - 22. Generators
Python Tutorial - 22. Generators
codebasics
36 Python Tutorial - 23. List Set Dict Comprehensions
Python Tutorial - 23. List Set Dict Comprehensions
codebasics
37 Python Tutorial - 24. Sets and Frozen Sets
Python Tutorial - 24. Sets and Frozen Sets
codebasics
38 Python Tutorial - 25. Command line argument processing using argparse
Python Tutorial - 25. Command line argument processing using argparse
codebasics
39 Debugging Tips - What is bug and debugging?
Debugging Tips - What is bug and debugging?
codebasics
40 Debugging Tips - Conditional Breakpoint
Debugging Tips - Conditional Breakpoint
codebasics
41 Debugging Tips - Watches and Call Stack
Debugging Tips - Watches and Call Stack
codebasics
42 Python Tutorial - 26. Multithreading - Introduction
Python Tutorial - 26. Multithreading - Introduction
codebasics
43 Git Tutorial 3:  How To Install Git
Git Tutorial 3: How To Install Git
codebasics
44 Git Tutorial 1: What is git / What is version control system?
Git Tutorial 1: What is git / What is version control system?
codebasics
45 Git Tutorial 2 : What is Github? | github tutorial
Git Tutorial 2 : What is Github? | github tutorial
codebasics
46 Git Tutorial 4: Basic Commands: add, commit, push
Git Tutorial 4: Basic Commands: add, commit, push
codebasics
47 Git Tutorial 5: Undoing/Reverting/Resetting code changes
Git Tutorial 5: Undoing/Reverting/Resetting code changes
codebasics
48 Git Tutorial 6: Branches (Create, Merge, Delete a branch)
Git Tutorial 6: Branches (Create, Merge, Delete a branch)
codebasics
Git Github Tutorial 10: What is Pull Request?
Git Github Tutorial 10: What is Pull Request?
codebasics
50 Git Tutorial 7: What is HEAD?
Git Tutorial 7: What is HEAD?
codebasics
51 Git Tutorial 9: Diff and Merge using meld
Git Tutorial 9: Diff and Merge using meld
codebasics
52 Difference between Multiprocessing and Multithreading
Difference between Multiprocessing and Multithreading
codebasics
53 Python Tutorial - 27. Multiprocessing Introduction
Python Tutorial - 27. Multiprocessing Introduction
codebasics
54 Python Tutorial - 28. Sharing Data Between Processes Using Array and Value
Python Tutorial - 28. Sharing Data Between Processes Using Array and Value
codebasics
55 Git Tutorial 8 - .gitignore file
Git Tutorial 8 - .gitignore file
codebasics
56 Python Tutorial - 29. Sharing Data Between Processes Using Multiprocessing Queue
Python Tutorial - 29. Sharing Data Between Processes Using Multiprocessing Queue
codebasics
57 Python Tutorial - 30. Multiprocessing Lock
Python Tutorial - 30. Multiprocessing Lock
codebasics
58 Python Tutorial - 31. Multiprocessing Pool (Map Reduce)
Python Tutorial - 31. Multiprocessing Pool (Map Reduce)
codebasics
59 What is code?
What is code?
codebasics
60 Python unit testing - pytest introduction
Python unit testing - pytest introduction
codebasics

Related AI Lessons

Stop Overfitting With Basically One Line of Code
Learn to prevent overfitting with a simple code tweak and understand the difference between Ridge and Lasso regression
Medium · AI
Stop Overfitting With Basically One Line of Code
Learn to prevent overfitting in machine learning models with a simple code tweak and understand the difference between Ridge and Lasso regression
Medium · Machine Learning
Stop Overfitting With Basically One Line of Code
Prevent overfitting in models with a simple code tweak, understanding the difference between Ridge and Lasso regression
Medium · Data Science
Stop Overfitting With Basically One Line of Code
Learn to prevent overfitting in machine learning models with a simple code tweak, comparing Ridge and Lasso regression techniques
Medium · Python
Up next
Learn Deep Learning by Hand (Beginner's Guide - Part 1)
Thu Vu
Watch →