1 00:00:00,120 --> 00:00:02,190 So let's now try making a pull request. 2 00:00:02,340 --> 00:00:09,330 We'll use the same repository, the future branch workflow for Colt and our Chicken Stevie. 3 00:00:09,480 --> 00:00:13,150 So we have this nav bar branch that Stevie pushed up, right? 4 00:00:13,170 --> 00:00:15,230 We can see nav bar right there. 5 00:00:15,240 --> 00:00:18,300 We also have the pricing table branch, but that's already been merged in. 6 00:00:18,300 --> 00:00:20,280 We didn't use a pull request to do that. 7 00:00:20,370 --> 00:00:26,580 I'm currently working as Stevie and if we take a closer look at the NAP Bar Branch, there's this button 8 00:00:26,580 --> 00:00:28,290 here, pull request. 9 00:00:28,440 --> 00:00:33,540 So first we can do a comparison between nav bar and Main. 10 00:00:34,860 --> 00:00:40,080 Now it assumes that I want to compare with Main because that's the default branch. 11 00:00:40,080 --> 00:00:45,120 But I could make a pull request to some other branch if if I needed to, I could make a pull request 12 00:00:45,120 --> 00:00:47,580 to the pricing table, just not that common. 13 00:00:48,120 --> 00:00:49,200 So it tells me. 14 00:00:49,200 --> 00:00:50,790 All right, here's your comparison. 15 00:00:50,790 --> 00:00:51,690 Good news. 16 00:00:51,690 --> 00:00:57,720 We're able to automatically merge your branch nav bar into Maine if we get to that point. 17 00:00:57,720 --> 00:01:04,349 So it's not going to merge without me clicking merge creating the pull request simply requests that 18 00:01:04,349 --> 00:01:05,010 merging. 19 00:01:05,280 --> 00:01:08,190 So we can see there's just two commits. 20 00:01:08,190 --> 00:01:08,520 Right. 21 00:01:08,520 --> 00:01:12,240 We have broken nav bar the nap bar fix. 22 00:01:12,240 --> 00:01:13,290 Here's the diff. 23 00:01:13,290 --> 00:01:16,770 We can see all the stuff that I added in or Stevie added in. 24 00:01:16,770 --> 00:01:22,410 Anyway, if I decide I want to make this pull request, I'll click that button, create, pull request 25 00:01:22,410 --> 00:01:23,940 and then I can put some title in here. 26 00:01:23,940 --> 00:01:26,190 It's just using the name of the branch. 27 00:01:26,190 --> 00:01:30,990 So how about add in bootstrap nav bar? 28 00:01:31,620 --> 00:01:33,660 Och, leave a comment. 29 00:01:33,660 --> 00:01:35,220 This is my comment. 30 00:01:35,220 --> 00:01:38,790 I can mention people like I'll mention Colt. 31 00:01:39,420 --> 00:01:41,040 Please take a look. 32 00:01:41,750 --> 00:01:44,360 So that will actually mention him as a user. 33 00:01:44,870 --> 00:01:50,630 You know, I can have bold text, I can put code in here, I can do all sorts of stuff from formatting 34 00:01:50,630 --> 00:01:53,270 and formatted information, but I'm just going to keep it simple. 35 00:01:53,810 --> 00:01:57,450 So add in bootstrap for this is my comment at called please take a look. 36 00:01:57,470 --> 00:01:58,040 Here we go. 37 00:01:58,040 --> 00:01:59,270 Create pull request. 38 00:01:59,270 --> 00:02:02,240 So from my nav bar branch to the main branch. 39 00:02:04,460 --> 00:02:04,940 All right. 40 00:02:04,940 --> 00:02:08,020 So here's the PR can see under PR or pull requests. 41 00:02:08,030 --> 00:02:08,990 We have one. 42 00:02:09,020 --> 00:02:10,100 It's open. 43 00:02:10,400 --> 00:02:13,430 It was created by Stevie Chix a couple of seconds ago. 44 00:02:13,820 --> 00:02:17,660 And we can also see the way that this repo is set up. 45 00:02:17,690 --> 00:02:19,400 Stevie can just merge it in. 46 00:02:19,400 --> 00:02:22,490 That probably is not the approach that we want to take. 47 00:02:22,880 --> 00:02:29,300 There are ways to restrict who can merge branches and organizations or who can merge powers, but for 48 00:02:29,300 --> 00:02:31,070 now, anybody can merge it in. 49 00:02:31,070 --> 00:02:34,610 So Stevie could make that PR and then also just turn around and click merge. 50 00:02:34,610 --> 00:02:36,050 But I'm not going to do that. 51 00:02:36,440 --> 00:02:39,380 Let's go switch over as cult. 52 00:02:39,710 --> 00:02:43,400 So we'll refresh the page on Colt Computer. 53 00:02:44,830 --> 00:02:47,050 And then we have this PR showing up. 54 00:02:47,080 --> 00:02:49,750 I also got a notification up here. 55 00:02:49,810 --> 00:02:54,760 I dismissed it when I wasn't recording, unfortunately, but I got notification for the fact that I 56 00:02:54,760 --> 00:02:56,680 was mentioned in this poll request. 57 00:02:56,890 --> 00:02:59,550 So I can respond to Stevie, right? 58 00:02:59,620 --> 00:03:03,910 I can decide one, I can merge it right now if I want to. 59 00:03:03,940 --> 00:03:07,030 I can close it and just say this pull request is going nowhere. 60 00:03:07,270 --> 00:03:13,870 We're not adding this in to the main branch or I can leave some comments like, you know, looks good 61 00:03:13,870 --> 00:03:15,170 or looks bad. 62 00:03:15,190 --> 00:03:17,080 Could you fix this or add this? 63 00:03:17,530 --> 00:03:18,940 Can you make this change? 64 00:03:18,940 --> 00:03:24,760 And changes can be added to a pull request after the pull request is originally created. 65 00:03:25,300 --> 00:03:30,700 We can continue to like in this example, Stevie could continue to to add to the NAV Bar branch and 66 00:03:30,700 --> 00:03:32,050 respond to feedback. 67 00:03:32,350 --> 00:03:36,120 But for this demo I'll do something like look good. 68 00:03:36,130 --> 00:03:36,460 Whoops. 69 00:03:36,460 --> 00:03:39,490 Didn't mean to do caps, but merging now. 70 00:03:40,030 --> 00:03:41,700 All right, so I'll leave that comment. 71 00:03:41,710 --> 00:03:43,060 I won't close it. 72 00:03:43,150 --> 00:03:47,230 So I haven't done any I haven't taken action, but now I'm going to. 73 00:03:47,260 --> 00:03:52,330 So not every poll request can be merged automatically on GitHub. 74 00:03:52,330 --> 00:03:55,690 Just like when we're doing merges locally with git. 75 00:03:55,720 --> 00:04:00,040 Not every branch merge is a fast forward or not everyone. 76 00:04:00,310 --> 00:04:03,910 It can be done automatically without generating any sort of conflicts. 77 00:04:04,060 --> 00:04:07,960 So what I'm doing here by clicking this button is telling GitHub. 78 00:04:07,960 --> 00:04:09,990 All right, go ahead and do the merge yourself. 79 00:04:10,000 --> 00:04:15,640 So then we're going to have some code that has been merged in on GitHub that we don't have locally. 80 00:04:15,640 --> 00:04:17,450 So the main branch is going to change. 81 00:04:17,450 --> 00:04:18,279 I'm going to click. 82 00:04:18,820 --> 00:04:21,880 All right, do I want to change the commit message? 83 00:04:21,880 --> 00:04:22,870 This is fine. 84 00:04:23,500 --> 00:04:24,700 Confirm merge. 85 00:04:25,730 --> 00:04:28,510 Successfully merged and close this pole request. 86 00:04:28,520 --> 00:04:31,150 The now far branch can now be safely deleted. 87 00:04:31,160 --> 00:04:33,050 So let's just delete it now. 88 00:04:34,690 --> 00:04:35,340 Okay. 89 00:04:35,350 --> 00:04:41,950 So now we have successfully completed one part of this workflow where we went from working on a feature 90 00:04:41,950 --> 00:04:47,710 branch, Stevie made it and then to actually added a commit, he fixed a bug, we pushed that up to 91 00:04:47,710 --> 00:04:49,060 GitHub, we make a pull request. 92 00:04:49,060 --> 00:04:55,420 That pull request was merged in and now if we look at our index HTML, we have the nav bar showing up 93 00:04:55,420 --> 00:04:56,860 on our main branch. 94 00:04:57,040 --> 00:05:01,720 So now other developers, everyone on the team needs to go and get the latest changes. 95 00:05:01,780 --> 00:05:08,140 So to do that and we could fetch or we can just pull Origin Main this is on Colt's machine. 96 00:05:09,690 --> 00:05:14,190 And now we should have the nav bar showing up somewhere. 97 00:05:14,190 --> 00:05:14,790 There it is. 98 00:05:14,790 --> 00:05:17,730 We have all that naff bar work from the naff bar branch. 99 00:05:18,180 --> 00:05:19,770 Just take a look at it here. 100 00:05:20,370 --> 00:05:21,210 There we are. 101 00:05:21,240 --> 00:05:28,280 So it's not very nice looking, but that came from a branch that Stevie created and pushed up to GitHub. 102 00:05:28,290 --> 00:05:34,440 Then we made that PR and then it accepted it, merged it in, and now individual users collaborators 103 00:05:34,440 --> 00:05:36,810 need to pull down the new main branch. 104 00:05:36,810 --> 00:05:41,940 And we could do the same thing on Stevie's side so we can get rid of the nav bar branch. 105 00:05:42,180 --> 00:05:43,920 We'll switch to Main first. 106 00:05:44,670 --> 00:05:50,610 We can remove nav bar so we can do get branch dash DX nav bar to delete it. 107 00:05:50,880 --> 00:05:56,190 So now it's gone locally and on GitHub and now I can pull down the latest version of Main. 108 00:05:56,190 --> 00:05:58,140 So get pull Origin Main. 109 00:06:00,030 --> 00:06:02,940 And our local main branch is updated. 110 00:06:02,940 --> 00:06:04,170 We have an app bar. 111 00:06:04,200 --> 00:06:06,180 I can just show it here. 112 00:06:06,540 --> 00:06:07,450 So there we go. 113 00:06:07,470 --> 00:06:13,050 We have the same end result, the same thing that we did to make this pricing table merged into the 114 00:06:13,050 --> 00:06:13,770 main branch. 115 00:06:13,800 --> 00:06:19,260 Except we did it via a pull request, an intermediate step that is done on GitHub, where we can have 116 00:06:19,260 --> 00:06:22,950 discussion and debate as to whether something should be merged in. 117 00:06:22,950 --> 00:06:25,020 And that's our first intro to PR.