9:59:59.000,9:59:59.000 Pull requests are a core part 9:59:59.000,9:59:59.000 of making a change[br]to any GitHub repository. 9:59:59.000,9:59:59.000 Let's figure out[br]how to use them effectively. 9:59:59.000,9:59:59.000 (smooth music) 9:59:59.000,9:59:59.000 Pull requests are a means 9:59:59.000,9:59:59.000 of submitting a change[br]to another code base. 9:59:59.000,9:59:59.000 You can do this[br]whether you're a core contributor, 9:59:59.000,9:59:59.000 or you're working[br]at arm's length with a fork. 9:59:59.000,9:59:59.000 If you're not a core contributor,[br]you can fork this project, 9:59:59.000,9:59:59.000 work on that change on your own 9:59:59.000,9:59:59.000 and send that change back as a proposal 9:59:59.000,9:59:59.000 on a pull request to the original author. 9:59:59.000,9:59:59.000 It means that making a correction[br]becomes easier than making a complaint, 9:59:59.000,9:59:59.000 which is why GitHub has really facilitated[br]the growth and development of Open Source. 9:59:59.000,9:59:59.000 Just make that edit,[br]make it better, 9:59:59.000,9:59:59.000 everyone benefits. 9:59:59.000,9:59:59.000 This also applies to closed projects,[br]corporate projects, private repos. 9:59:59.000,9:59:59.000 If you do have access[br]to push to a repository, 9:59:59.000,9:59:59.000 you should still work on a branch[br]and send that pull request 9:59:59.000,9:59:59.000 to get some review on your code. 9:59:59.000,9:59:59.000 This means you're going[br]to create a branch, 9:59:59.000,9:59:59.000 start making some commits,[br]and when you're ready to get it reviewed, 9:59:59.000,9:59:59.000 send that back to everyone else[br]on your team in that pull request. 9:59:59.000,9:59:59.000 This means that a pull request[br]is a conversation, 9:59:59.000,9:59:59.000 not just a one-shot submission[br]of what's on a branch, 9:59:59.000,9:59:59.000 but rather, a little bit[br]of dialogue and discussion, 9:59:59.000,9:59:59.000 some revision to the code,[br]that all appears in chronological order, 9:59:59.000,9:59:59.000 and finally, an approval,[br]or in the terrible case, 9:59:59.000,9:59:59.000 a thumbs down that says, "this does not[br]seem like a wise change to the code base." 9:59:59.000,9:59:59.000 But in either of those two situations,[br]the URL and the pull request lives on. 9:59:59.000,9:59:59.000 You don't have to stop talking 9:59:59.000,9:59:59.000 just because things[br]were closed out and not accepted. 9:59:59.000,9:59:59.000 You can continue to find out[br]why it wasn't accepted 9:59:59.000,9:59:59.000 and what changes[br]you can make in the future 9:59:59.000,9:59:59.000 to make sure all your pull requests[br]will be accepted. 9:59:59.000,9:59:59.000 This also serves as an educational tool 9:59:59.000,9:59:59.000 for people who join the team[br]at a later time. 9:59:59.000,9:59:59.000 These pull requests are dialogues[br]of what type of change 9:59:59.000,9:59:59.000 might be culturally acceptable here, 9:59:59.000,9:59:59.000 what are the expectations,[br]requirements, formats 9:59:59.000,9:59:59.000 that people expect stuff in, 9:59:59.000,9:59:59.000 and you can save these URLs[br]and point to them as educational tools 9:59:59.000,9:59:59.000 for these new individuals. 9:59:59.000,9:59:59.000 This means you don't have[br]to forward on some email conversation 9:59:59.000,9:59:59.000 about how a feature came to be. 9:59:59.000,9:59:59.000 You can just point someone to a URL[br]and they can look at it for all time. 9:59:59.000,9:59:59.000 We're also interested[br]in the technical inputs, 9:59:59.000,9:59:59.000 not just the human ones. 9:59:59.000,9:59:59.000 A CI system, continuous integration, 9:59:59.000,9:59:59.000 like Travis, Hudson,[br]Jenkins, Circle CI, Team City, 9:59:59.000,9:59:59.000 can all integrate[br]with a GitHub pull request 9:59:59.000,9:59:59.000 and report the build status[br]for this branch, 9:59:59.000,9:59:59.000 the fundamental unit of a pull request, 9:59:59.000,9:59:59.000 right in the line with that conversation. 9:59:59.000,9:59:59.000 So that means along with the conversation[br]and the changes to code, 9:59:59.000,9:59:59.000 there's little build statuses[br]that'll pop up to say, 9:59:59.000,9:59:59.000 "yes, all the tests have passed"[br]or "no, we have some failing test". 9:59:59.000,9:59:59.000 It also affects the status[br]of the Merge button 9:59:59.000,9:59:59.000 providing you a warning saying, 9:59:59.000,9:59:59.000 "wouldn't you like to have[br]all the tests passing 9:59:59.000,9:59:59.000 and this branch be clean, 9:59:59.000,9:59:59.000 before you potentially press[br]this Merge Pull Request button?" 9:59:59.000,9:59:59.000 So now that we have CI status integrated[br]with the idea of human feedback, 9:59:59.000,9:59:59.000 we have holistic, human review[br]plus technical set of tests, 9:59:59.000,9:59:59.000 but not only on the contents[br]of the branch, 9:59:59.000,9:59:59.000 but on a predictive merge[br]of both the branch and its destination, 9:59:59.000,9:59:59.000 so you get to see into the future 9:59:59.000,9:59:59.000 what this would be like if it was merged. 9:59:59.000,9:59:59.000 This doesn't mean[br]that that merge is permanent. 9:59:59.000,9:59:59.000 It'll actually do that predictive merge,[br]see how things go, 9:59:59.000,9:59:59.000 and then let you know[br]if you did merge this in, 9:59:59.000,9:59:59.000 if you would be successful or not. 9:59:59.000,9:59:59.000 So if CI reports a good status,[br]you have social acceptance 9:59:59.000,9:59:59.000 with a couple of thumbs up[br]and ship its in the thread, 9:59:59.000,9:59:59.000 it's time to press[br]the Merge Pull Request button. 9:59:59.000,9:59:59.000 Once that happens, you're also presented[br]with the option to delete the branch, 9:59:59.000,9:59:59.000 which sounds kind of scary,[br]but isn't a bad thing. 9:59:59.000,9:59:59.000 We don't have to really worry[br]about closing out and deleting that branch 9:59:59.000,9:59:59.000 because all of the commits[br]are in the destination branch. 9:59:59.000,9:59:59.000 They've been preserved, 9:59:59.000,9:59:59.000 so you can delete that branch[br]to let people know 9:59:59.000,9:59:59.000 future development[br]isn't happening over there. 9:59:59.000,9:59:59.000 The pull request still stays around, 9:59:59.000,9:59:59.000 in case you want[br]the record of the discussion, 9:59:59.000,9:59:59.000 and your identity and the credit[br]for the work that you've done 9:59:59.000,9:59:59.000 appears in the destination branch[br]along with those merged in commits. 9:59:59.000,9:59:59.000 Thanks for watching this Git[br]and GitHub Foundations episode 9:59:59.000,9:59:59.000 on the World renowned pull request. 9:59:59.000,9:59:59.000 Don't forget to click Subscribe[br]on any of these channels on the side. 9:59:59.000,9:59:59.000 Or, ask us a question[br]or leave a comment down below, 9:59:59.000,9:59:59.000 or check out any[br]of these other educational videos 9:59:59.000,9:59:59.000 on Git and GitHub topics.