1 00:00:00,120 --> 00:00:05,270 This video is just additional practice or reinforcement on the basic pushing workflow. 2 00:00:05,310 --> 00:00:09,350 Add commit push up to GitHub and repeat. 3 00:00:09,360 --> 00:00:14,070 So if you feel good about that, move on to the next video where I talk about cloning your own repos. 4 00:00:14,100 --> 00:00:21,720 Option two But for now, I'm going to go back to my first novel and nothing super exciting in here. 5 00:00:21,720 --> 00:00:24,220 But why don't we make a new branch? 6 00:00:24,240 --> 00:00:26,250 What branch are we on right now? 7 00:00:26,610 --> 00:00:28,590 We're on this empty branch. 8 00:00:28,800 --> 00:00:30,600 What would be a good branch to make? 9 00:00:30,870 --> 00:00:32,460 Why don't we go back to Master? 10 00:00:32,940 --> 00:00:38,340 So I'm going to switch get switch master and I'm going to pretend to do some more work. 11 00:00:38,370 --> 00:00:40,840 We've got chapter two, three, four. 12 00:00:40,860 --> 00:00:43,040 Why don't I remove this mood board? 13 00:00:43,050 --> 00:00:44,640 I'm just going to get rid of that. 14 00:00:44,970 --> 00:00:49,310 So I'm going to do an REM dash ref mood board. 15 00:00:50,040 --> 00:00:51,180 So I got rid of that folder. 16 00:00:51,180 --> 00:00:59,970 I'll do a get status, I'll add all those changes, get commits, delete mood board folder. 17 00:01:00,810 --> 00:01:07,320 So now we have this new commit that only exists here locally on my repo, on my laptop, on the master 18 00:01:07,320 --> 00:01:10,020 branch, not up on GitHub. 19 00:01:10,170 --> 00:01:14,340 So now I'm going to switch to the empty branch, get switch empty. 20 00:01:14,370 --> 00:01:16,710 I'm going to make another commit on this branch. 21 00:01:16,710 --> 00:01:18,390 So what do we have in here? 22 00:01:18,870 --> 00:01:20,010 Not a whole lot. 23 00:01:20,100 --> 00:01:22,050 Why don't I make a new file? 24 00:01:22,080 --> 00:01:23,370 I'll call this one. 25 00:01:23,820 --> 00:01:24,950 Characters outline. 26 00:01:24,960 --> 00:01:27,030 How about summary text? 27 00:01:27,750 --> 00:01:30,990 And then I'm just going to add that empty file and commit it. 28 00:01:31,000 --> 00:01:32,730 Add summary file. 29 00:01:33,650 --> 00:01:33,820 Okay. 30 00:01:33,870 --> 00:01:40,350 So now we have a commit here on empty that is not on GitHub and we have a commit on master that is not 31 00:01:40,350 --> 00:01:41,130 on GitHub. 32 00:01:41,430 --> 00:01:43,680 So let's push both of them up. 33 00:01:44,070 --> 00:01:45,590 It's going to take two commands. 34 00:01:45,600 --> 00:01:45,960 Right? 35 00:01:45,960 --> 00:01:50,580 We need to first decide, let's push up Master Branch or let's push up the empty branch. 36 00:01:50,670 --> 00:01:54,000 Remember the syntax get push and then our remote is origin. 37 00:01:54,000 --> 00:01:55,350 That's the only one we have. 38 00:01:55,350 --> 00:01:58,020 And then I'll push the master branch to begin with. 39 00:01:59,450 --> 00:02:00,040 Okay. 40 00:02:00,320 --> 00:02:05,810 So if I come back to my GitHub and I refresh, I don't see anything new here. 41 00:02:05,810 --> 00:02:06,080 Right. 42 00:02:06,110 --> 00:02:08,780 Because I'm still on the empty branch on GitHub. 43 00:02:08,870 --> 00:02:10,580 I'm looking at the empty branch. 44 00:02:10,580 --> 00:02:12,920 But if I switch to the master branch. 45 00:02:13,880 --> 00:02:20,930 We can see this new commit 2 minutes ago delete mood board folder and we don't see the mood board here 46 00:02:20,930 --> 00:02:21,800 anymore at all. 47 00:02:22,370 --> 00:02:29,180 So I can take a look at that commit specifically see what was deleted as you see there, the whole Moodboard 48 00:02:29,180 --> 00:02:30,980 directory and its image contents. 49 00:02:30,980 --> 00:02:32,750 So that new commit was pushed up. 50 00:02:32,750 --> 00:02:38,300 Whatever new commits existed on the master branch but on the empty branch nothing has changed on GitHub. 51 00:02:38,870 --> 00:02:44,510 Remember on my local empty branch, which I'm on right now, we have this new file summary and we have 52 00:02:44,510 --> 00:02:47,750 a commit called well what was it, add summary file. 53 00:02:47,750 --> 00:02:48,740 That was the message. 54 00:02:48,740 --> 00:02:53,900 So if I want to push that up, I need to do git push origin and then the empty branch. 55 00:02:55,870 --> 00:03:00,460 And if we head over here refresh at some points. 56 00:03:00,850 --> 00:03:01,740 Here we are. 57 00:03:01,750 --> 00:03:08,140 Empty had recent pushes less than a minute ago and we see summary text that was pushed up and the commit 58 00:03:08,140 --> 00:03:12,340 that it was associated with add summary file two days ago. 59 00:03:12,820 --> 00:03:16,200 So that's yeah, that's pretty much all I wanted to show you here. 60 00:03:16,210 --> 00:03:21,520 Right, that basic workflow, do some stuff locally on a branch, make some commits and then you push 61 00:03:21,520 --> 00:03:22,450 that branch up. 62 00:03:22,450 --> 00:03:25,450 And that about wraps up the basics of using the push command. 63 00:03:25,720 --> 00:03:31,270 We have a branch locally, we push it up with git push remote and branch name, then GitHub. 64 00:03:31,270 --> 00:03:33,880 Now has that branch hosted in the cloud. 65 00:03:33,880 --> 00:03:39,400 And then we repeat that if we want to push another branch up now you don't have to push every branch 66 00:03:39,400 --> 00:03:40,240 you make up. 67 00:03:40,570 --> 00:03:46,030 Often what you'll do is have a master or a main branch and then you'll have branches where you work 68 00:03:46,030 --> 00:03:46,720 on features. 69 00:03:46,720 --> 00:03:52,600 You can merge those into Master Main and then push that new master slash main work up. 70 00:03:53,140 --> 00:03:56,410 Or you can push branches up to GitHub and just have a whole bunch of branches. 71 00:03:56,410 --> 00:03:59,040 But that's something we'll talk about when we get to workflows. 72 00:03:59,050 --> 00:03:59,590 All right.