WEBVTT NOTE This file was generated by Descript 00:00:06.556 --> 00:00:07.006 Drew K: Hey, there. 00:00:07.006 --> 00:00:10.756 Welcome to coding with Drew in this video, we're gonna learn all about, git. 00:00:11.146 --> 00:00:14.116 If you're not familiar with git this video is for you. 00:00:14.236 --> 00:00:18.076 It took me a long time to git comfortable with git, and then I learned that 00:00:18.076 --> 00:00:20.596 basically there's only a handful of commands that you really need to 00:00:20.596 --> 00:00:23.416 know, you'll use those regularly. 00:00:23.746 --> 00:00:28.665 And anything else will, you'll just end up re cloning your git 00:00:28.685 --> 00:00:33.593 repository and then you'll end up pushing your changes to a new branch. 00:00:33.623 --> 00:00:37.263 It's really not nearly as hard as it seems. 00:00:37.563 --> 00:00:39.958 And I'm gonna demystify that so the first thing we're gonna do 00:00:39.958 --> 00:00:41.608 is create an account on GitHub. 00:00:41.998 --> 00:00:45.928 So if you haven't gotten an account on github.com, go ahead and do that. 00:00:45.978 --> 00:00:51.688 All right, open up our terminal and we're gonna say brew install GI. 00:00:52.378 --> 00:00:54.328 Now I've already got, git installed. 00:00:54.448 --> 00:00:56.758 So this should be relatively quick. 00:00:57.558 --> 00:00:59.448 It'll ask me if I would like to reinstall. 00:01:00.248 --> 00:01:02.888 Okay, so now git is installed. 00:01:03.198 --> 00:01:04.368 So next. 00:01:04.908 --> 00:01:06.708 We're gonna create an SSH key. 00:01:07.218 --> 00:01:11.208 So you're gonna wanna create an SSH key, so that way you can clone 00:01:11.208 --> 00:01:14.718 repositories and this'll be necessary whenever you start working as a 00:01:14.718 --> 00:01:19.775 full-time developer because you'll need to SSH into private repositories. 00:01:20.575 --> 00:01:26.115 The way we do that is with a command called SSH dash Keygen, and we can 00:01:26.115 --> 00:01:29.595 specify the type of encryption. 00:01:30.075 --> 00:01:36.045 And so we're gonna do ed 2 55 19, and you don't really need to know what that means. 00:01:36.045 --> 00:01:38.233 It's just, it's very it's very good encryption. 00:01:38.593 --> 00:01:44.471 And then We need to type dash capital C for comment and give our email address. 00:01:44.501 --> 00:01:47.841 So for me, it's drewlearns@hey.com and then we press return. 00:01:48.381 --> 00:01:51.406 And it's gonna ask you what file you would like to name this? 00:01:52.206 --> 00:01:56.406 I would recommend just pressing return, but since I already have one 00:01:56.406 --> 00:01:57.816 there, I don't want to overwrite it. 00:01:58.146 --> 00:01:59.406 I'm gonna call it one, two, three. 00:02:00.096 --> 00:02:00.426 All right. 00:02:00.486 --> 00:02:03.576 So I'm gonna press return and now it wants to know a passphrase. 00:02:03.996 --> 00:02:06.666 You don't have to provide a pass raise, though. 00:02:07.086 --> 00:02:09.936 It is recommended because this adds a layer of security. 00:02:10.146 --> 00:02:12.486 I'm just gonna press return twice. 00:02:13.286 --> 00:02:15.566 Normally you would just type in a password twice. 00:02:15.656 --> 00:02:15.896 Okay. 00:02:15.901 --> 00:02:18.926 Now I have an SSH key and I can find it here. 00:02:19.376 --> 00:02:25.686 So let me clear out we're gonna go CD Tilda for home dot SSH. 00:02:26.486 --> 00:02:28.376 And then we'll look inside this directory. 00:02:28.436 --> 00:02:32.326 So now you can see, there are two files, 1, 2, 3, and 1, 2, 3, dot pub. 00:02:33.126 --> 00:02:35.226 We want to copy the public key. 00:02:35.706 --> 00:02:41.536 So let's see PB copy, and then we're gonna redirect the output. 00:02:41.566 --> 00:02:43.666 Now, if you're not familiar with some of these bash commands that I'm 00:02:43.666 --> 00:02:46.573 running they are all in my bash course. 00:02:46.573 --> 00:02:47.873 I highly would recommend it. 00:02:48.573 --> 00:02:52.053 So then we're gonna do 1, 2, 3 dot PUB. 00:02:52.853 --> 00:02:56.843 and now if I paste, you can see that it's there. 00:02:57.293 --> 00:03:01.523 So I'm gonna close that out and we're gonna open up GitHub. 00:03:02.323 --> 00:03:03.283 We're gonna sign in. 00:03:03.389 --> 00:03:09.129 And then we're gonna go over to our profile and we're gonna go to settings 00:03:09.929 --> 00:03:13.909 and we're gonna scroll down to SSH and GPG. 00:03:14.674 --> 00:03:19.274 and now we're gonna click add new SSH key, and we're gonna 00:03:19.274 --> 00:03:20.864 paste what we had in there. 00:03:21.664 --> 00:03:24.711 And we're gonna call this one, whatever, for me, it was 1, 2, 3, 00:03:25.221 --> 00:03:29.391 and then we're gonna scroll down and add the SSH key by clicking there. 00:03:30.111 --> 00:03:30.471 Okay. 00:03:31.041 --> 00:03:33.561 So now you have SSH setup. 00:03:34.361 --> 00:03:41.046 You can perform git clone for remote repositories, and you can push your 00:03:41.076 --> 00:03:46.566 local work to the remote repository, but first we have to set up some global 00:03:46.966 --> 00:03:48.846 configurations as you can see here. 00:03:49.646 --> 00:03:49.976 All right. 00:03:49.976 --> 00:03:50.756 So let's go ahead. 00:03:51.156 --> 00:03:57.667 So let's go ahead and it, and run git config dash global. 00:03:58.467 --> 00:04:03.560 And then we're gonna add user dot name so let's go ahead and copy 00:04:03.890 --> 00:04:08.650 this part to our clipboard, the user dot all the way to the beginning. 00:04:09.450 --> 00:04:15.220 And we're gonna say Drew Karriker you can say your name obviously, 00:04:15.700 --> 00:04:18.545 and then we're gonna do the same thing, but we're gonna say email. 00:04:19.345 --> 00:04:22.880 We'll say DrewLearns@hey.com, obviously use your email. 00:04:23.510 --> 00:04:26.240 And then so now my git is set up. 00:04:26.990 --> 00:04:29.090 Now we can look at git flows. 00:04:29.890 --> 00:04:34.950 So what I didn't understand for a long time was the whole process of git and 00:04:34.950 --> 00:04:41.043 git CLI git CLI is super easy, but you just need to know like a kind of 00:04:41.043 --> 00:04:43.138 mental mapping of how everything works. 00:04:43.607 --> 00:04:48.687 So your local repository consists of trees and those trees are maintained by GIT. 00:04:49.147 --> 00:04:53.562 The first one is your working directory and that's stored, you 00:04:53.567 --> 00:04:58.209 CD into that directory that working directory holds the actual files. 00:04:58.859 --> 00:05:02.849 The second one is the index, which acts as a staging area. 00:05:03.329 --> 00:05:08.319 And then finally, there's the head points to the last commit that you've made, and 00:05:08.499 --> 00:05:10.479 that will change the files accordingly. 00:05:11.279 --> 00:05:17.539 This gives you a way to to keep track of changes on your files. 00:05:18.319 --> 00:05:21.669 We're gonna actually look at an example here so first thing I'm gonna do is 00:05:21.669 --> 00:05:26.679 clone a URL, and then I'm gonna do some work, but if I've already done the work 00:05:26.684 --> 00:05:28.629 locally, it can git a little hairy. 00:05:29.089 --> 00:05:30.999 So I gotta work around for you. 00:05:31.239 --> 00:05:34.839 That'll make life a lot easier than trying to figure out new, git commands 00:05:34.839 --> 00:05:38.736 that you're not familiar with and just, stick with the simplicity of 00:05:38.862 --> 00:05:40.392 first thing we're gonna do is git co. 00:05:41.192 --> 00:05:44.847 and then we're gonna git checkout and we're gonna make our changes. 00:05:45.647 --> 00:05:46.877 After we've made changes. 00:05:46.877 --> 00:05:48.017 We do three steps. 00:05:48.367 --> 00:05:51.777 git add, git commit, git push. 00:05:52.197 --> 00:05:55.757 I added git status in here because I want you to know that it's a really 00:05:55.762 --> 00:05:57.797 great tool to see where you're at. 00:05:58.297 --> 00:05:58.567 All right. 00:05:58.567 --> 00:05:59.857 So let's git some practice in. 00:06:00.657 --> 00:06:03.317 In our home directory, we're gonna create a directory. 00:06:03.767 --> 00:06:04.157 All right. 00:06:04.187 --> 00:06:08.407 So mkdir git test. 00:06:09.207 --> 00:06:09.427 CD. 00:06:09.707 --> 00:06:12.137 Change directory into git test. 00:06:12.937 --> 00:06:13.207 All right. 00:06:13.267 --> 00:06:15.847 Now we can see that we are in there. 00:06:16.027 --> 00:06:16.897 Let's create a file. 00:06:16.927 --> 00:06:24.584 We'll say echo, this is a line and we're gonna redirect it into git. 00:06:24.604 --> 00:06:27.814 git dot TXT, git dot TXT. 00:06:27.814 --> 00:06:32.604 This redirection with one greater than sign will create a new one if you're 00:06:32.609 --> 00:06:36.555 not familiar with bash you can take my bash course while in codingwithdrew.com 00:06:36.985 --> 00:06:39.485 and demystify all this stuff. 00:06:39.515 --> 00:06:39.755 All right. 00:06:39.755 --> 00:06:41.795 So we're gonna echo that in there. 00:06:42.125 --> 00:06:45.275 And now let's cat git dot TXT. 00:06:45.635 --> 00:06:49.125 And you can see that the file contents says, this is a line. 00:06:49.125 --> 00:06:56.421 If I do git, and it you'll see that I'm initializing a new git repository. 00:06:56.691 --> 00:07:01.251 So I'm telling, git that this will be managed by git, and 00:07:01.251 --> 00:07:02.271 that's all it really does. 00:07:02.671 --> 00:07:03.541 Let's make a change. 00:07:03.931 --> 00:07:07.441 Let's add a new line to our git dot TXT. 00:07:07.441 --> 00:07:13.619 So echo, this is a new line and double greater than signs. 00:07:14.319 --> 00:07:15.629 git dot TXT. 00:07:16.429 --> 00:07:19.519 So now if we cat git dot TXT. 00:07:20.319 --> 00:07:21.939 We can see that it's got two lines. 00:07:21.939 --> 00:07:26.609 So now what we wanna do is add, commit, push, right? 00:07:26.669 --> 00:07:27.749 So that same flow. 00:07:28.229 --> 00:07:33.539 So the easiest way is git, add all or just dot. 00:07:33.779 --> 00:07:36.389 And if you take, my batch course will know, you'll understand 00:07:36.419 --> 00:07:37.059 this a little bit better. 00:07:37.859 --> 00:07:40.029 Alternatively, you can do interactive. 00:07:40.119 --> 00:07:43.419 So dash I, so let's look at interactive. 00:07:43.689 --> 00:07:48.504 So interactive, you can follow a basic menu, but I don't want to do this. 00:07:48.604 --> 00:07:53.454 You can play around with it if you'd like, so git add dot. 00:07:54.254 --> 00:07:56.444 And so now we can do git status. 00:07:57.244 --> 00:07:59.224 And so we can see that there's a new file. 00:07:59.644 --> 00:08:03.904 Inside of that directory and it's not pushed to our index. 00:08:03.904 --> 00:08:07.444 Another thing to note is you can see here, this says, plus one, 00:08:07.534 --> 00:08:08.974 this means, and it's in yellow. 00:08:09.034 --> 00:08:12.504 This means that it is a dirty working branch. 00:08:12.714 --> 00:08:17.964 So there are changes to the branch or to the working directory that are 00:08:17.964 --> 00:08:20.244 not in git or git is not tracking. 00:08:20.964 --> 00:08:22.314 So we wanna track those. 00:08:22.674 --> 00:08:30.194 And the easiest way is to do git commit dash m "initial commit". 00:08:30.624 --> 00:08:37.044 So the initial commit part is just a verbose way of identifying. 00:08:37.044 --> 00:08:39.174 This is what changed in this commit. 00:08:39.834 --> 00:08:42.624 I'm calling this one initial commit, cuz it's the first one I've done. 00:08:43.424 --> 00:08:43.784 All right. 00:08:44.174 --> 00:08:49.264 So now if we do git status, we can see that our working branch is clean. 00:08:49.969 --> 00:08:53.029 And there's no plus one and this is green. 00:08:53.829 --> 00:08:54.159 All right. 00:08:54.159 --> 00:08:56.049 So let's clear this out now. 00:08:56.099 --> 00:08:57.299 Let's do another change. 00:08:57.299 --> 00:09:04.039 So let's say echo, this is the third line, and then we're gonna 00:09:04.039 --> 00:09:07.699 add it to git TXT and press return. 00:09:07.729 --> 00:09:09.919 Now you can see it's changed here. 00:09:10.719 --> 00:09:13.989 Now we can do git status and we can see what has changed. 00:09:13.989 --> 00:09:14.919 And it says modified. 00:09:14.949 --> 00:09:16.569 We modified git dot TX. 00:09:17.369 --> 00:09:22.059 So just for practice, we'll do git, add all, and then we can do git 00:09:22.079 --> 00:09:26.869 status again and see that we've now we are now tracking it because it's 00:09:26.869 --> 00:09:29.894 green, but we have it staged only. 00:09:29.954 --> 00:09:32.644 So it's in a staging environment or our index. 00:09:33.444 --> 00:09:34.794 We wanna put it in our head. 00:09:34.794 --> 00:09:43.364 So the way that we do that is we do git commit M and you say added a third line. 00:09:44.164 --> 00:09:49.954 So now we have a clean working branch and we know this by running git status. 00:09:50.014 --> 00:09:53.584 It says nothing to commit, clean working branch. 00:09:53.944 --> 00:09:54.334 All right. 00:09:54.334 --> 00:09:55.414 So that's cool. 00:09:55.834 --> 00:09:58.344 We've now learned the basics of git. 00:09:58.744 --> 00:10:03.094 . Now let's work on trying to git this work into a remote repository. 00:10:03.574 --> 00:10:07.204 So there's a bunch of hard ways to git like a local repository that 00:10:07.204 --> 00:10:09.664 you've already created up into GitHub. 00:10:10.144 --> 00:10:11.704 There's an easier way. 00:10:11.854 --> 00:10:13.034 Let's figure it out. 00:10:13.834 --> 00:10:14.074 All right. 00:10:14.074 --> 00:10:15.184 Let's cd.dot. 00:10:15.844 --> 00:10:16.174 All right. 00:10:16.974 --> 00:10:18.874 And then, open GitHub. 00:10:19.624 --> 00:10:22.204 All right, let's go ahead and create a new repository. 00:10:23.004 --> 00:10:26.574 Inside of this, we're just gonna call this, git test. 00:10:27.374 --> 00:10:28.514 We're gonna call it public. 00:10:28.634 --> 00:10:31.094 We don't need to add a readme or do anything special. 00:10:31.144 --> 00:10:34.714 We're gonna go over here to GitHub and we're gonna click create the new repo, 00:10:35.514 --> 00:10:39.834 and then we're gonna come over here and we're gonna name it, git example. 00:10:40.634 --> 00:10:41.084 All right. 00:10:41.204 --> 00:10:43.844 And now we're not gonna make any other changes. 00:10:43.844 --> 00:10:46.214 We're just gonna click create repository. 00:10:46.724 --> 00:10:47.774 Now you have two options here. 00:10:47.984 --> 00:10:50.834 You can clone using H C TPS or. 00:10:51.329 --> 00:10:52.019 SSH. 00:10:52.079 --> 00:10:54.419 We always wanna do SSH wherever possible. 00:10:54.869 --> 00:10:57.809 It's more secure and it's faster. 00:10:58.079 --> 00:10:59.349 So, let's give this a try. 00:10:59.349 --> 00:11:00.249 So copy that. 00:11:00.489 --> 00:11:05.069 And then we're gonna open up our terminal and say, git clone boom. 00:11:05.869 --> 00:11:10.579 So this is gonna ask me for my password, which I set up with my SSH key. 00:11:11.379 --> 00:11:14.009 And now it says that I appear to. 00:11:14.809 --> 00:11:24.269 Cloned an empty repository, but by LS and I CD into my git example and 00:11:24.269 --> 00:11:30.469 I see that there's no files inside of it, but I did do work in CD, git 00:11:31.039 --> 00:11:33.314 test, there's a git dot TXT in there. 00:11:33.674 --> 00:11:39.174 So how do I move all those changes from one repository into another? 00:11:39.201 --> 00:11:39.741 The easiest. 00:11:40.541 --> 00:11:46.481 If you ask me is to copy that whole directory and just move it in there 00:11:46.605 --> 00:11:49.425 and do it as a, as a new branch. 00:11:50.225 --> 00:11:51.285 So let's look at that. 00:11:51.795 --> 00:11:52.975 CD dot dot. 00:11:53.745 --> 00:11:57.285 CD git example. 00:11:58.085 --> 00:12:00.035 So we wanna create a new branch. 00:12:00.095 --> 00:12:04.295 So we say, git checkout dash B. 00:12:04.505 --> 00:12:07.325 Now this is the only checkout command you really need to know what this 00:12:07.325 --> 00:12:13.615 does is this will check out the remote repository@github.com and 00:12:13.615 --> 00:12:15.415 it'll create a new branch for you. 00:12:15.880 --> 00:12:20.940 And so what we're gonna call this is merge git test. 00:12:21.740 --> 00:12:22.130 All right. 00:12:22.700 --> 00:12:27.380 And so when we do that, you can see that this is no longer saying master. 00:12:27.500 --> 00:12:32.420 It says merge git test, which is the branch that we are currently on. 00:12:32.450 --> 00:12:33.830 So git status. 00:12:34.460 --> 00:12:36.440 We can see that there's no commits here. 00:12:37.190 --> 00:12:46.370 So let's move all the files from git test slash git text, and 00:12:46.370 --> 00:12:48.790 we're gonna move it to here. 00:12:49.590 --> 00:12:50.370 So let's do that. 00:12:50.520 --> 00:12:56.160 Now, if we LS there it is, they say, git status and we can see that there is 00:12:56.430 --> 00:13:00.210 an UN track change in this repository. 00:13:00.810 --> 00:13:07.430 So git, add all, and then we git status. 00:13:08.060 --> 00:13:18.875 We say, git commit dash M initial new merge, commit, git push. 00:13:18.935 --> 00:13:24.553 So we're now gonna push it and, oh, now we git an error and this is really important. 00:13:24.553 --> 00:13:27.283 So we ran git push and I recommend doing this anyways. 00:13:27.583 --> 00:13:30.703 And then it'll automatically give you the command that you actually need to. 00:13:31.498 --> 00:13:33.478 In order to push to your remote repository. 00:13:33.538 --> 00:13:35.938 So we're just gonna copy that and paste it. 00:13:36.738 --> 00:13:39.078 And it's prompting me for my password. 00:13:39.878 --> 00:13:40.778 And there we go. 00:13:41.018 --> 00:13:48.048 So now, if I go to GitHub and I refresh this page, you can see that there is one 00:13:48.048 --> 00:13:51.348 branch and it's got, git dot TXT in it. 00:13:52.148 --> 00:13:53.978 So if I go to master. 00:13:54.778 --> 00:13:55.888 there is no master. 00:13:56.488 --> 00:13:57.338 What happened? 00:13:57.355 --> 00:14:01.672 Master is just a placeholder and it's actually if you have the 00:14:01.672 --> 00:14:08.382 opportunity, I recommend changing all branches from master to Maine. 00:14:08.382 --> 00:14:12.289 It's it's not really good vernacular to use anymore. 00:14:13.089 --> 00:14:15.255 This day and age, it's just unacceptable. 00:14:15.255 --> 00:14:19.936 You can see that you now have this branch, so we're gonna learn how to 00:14:19.936 --> 00:14:22.966 branch and make commits to new branch. 00:14:23.026 --> 00:14:24.856 So let's do the same thing we did before. 00:14:25.356 --> 00:14:27.436 git, check out dash B. 00:14:28.236 --> 00:14:33.956 This creates a new branch and checks it out and we're gonna call this new branch. 00:14:34.756 --> 00:14:38.146 So let's practice creating a new branch and then we're gonna merge 00:14:38.151 --> 00:14:41.521 it in, into our git merge git test. 00:14:41.671 --> 00:14:42.031 Okay. 00:14:42.631 --> 00:14:49.311 So git checkout dash B and we're gonna call this one drew. 00:14:50.111 --> 00:14:51.731 So we've created in a new branch. 00:14:52.091 --> 00:14:53.591 Let's go ahead and make a change. 00:14:53.651 --> 00:14:54.851 So we're gonna say echo, 00:14:55.651 --> 00:15:01.971 this is a test and we're gonna put it at the end of our git dot TXT. 00:15:02.771 --> 00:15:06.561 And then, what we're gonna end up doing is we're gonna cat it. 00:15:06.561 --> 00:15:10.221 And so cat git TXT and you say, this is a test. 00:15:10.291 --> 00:15:10.631 Is there. 00:15:11.301 --> 00:15:18.351 And then now that it's there, we want to git, add dot, git commit. 00:15:18.861 --> 00:15:24.051 M and we're gonna just call this one, drew initial commit. 00:15:24.851 --> 00:15:25.241 All right. 00:15:25.241 --> 00:15:27.751 Now, git push. 00:15:28.551 --> 00:15:32.781 And now you see that it gave us this fancy command that I didn't have to try 00:15:32.781 --> 00:15:34.971 to type out or figure out, and I press. 00:15:35.771 --> 00:15:40.751 And now if I open up GitHub and on my branches page, there should 00:15:40.756 --> 00:15:44.831 be two branches there's drew, and then the default branch. 00:15:45.131 --> 00:15:49.511 So the default branch, like I said, had updated from master to merge git test. 00:15:49.811 --> 00:15:50.171 Okay. 00:15:50.441 --> 00:15:55.891 So let's clear this out and now there's this interesting bit we can do. 00:15:56.401 --> 00:15:58.991 So cat git. 00:15:59.791 --> 00:16:00.251 TXT here. 00:16:00.806 --> 00:16:06.923 So now what we're gonna do is a new command git branch dash a and this lists 00:16:06.983 --> 00:16:12.983 all branches, so a for all git branch and you can see that there is merge. 00:16:13.673 --> 00:16:14.183 Test. 00:16:14.183 --> 00:16:17.423 So we're gonna switch to this one, so I'm gonna copy it to my clipboard. 00:16:18.223 --> 00:16:20.113 And then I'm gonna press Q to close this. 00:16:20.503 --> 00:16:23.613 So git switch merge, git test. 00:16:24.123 --> 00:16:24.543 Okay. 00:16:24.693 --> 00:16:32.573 And now we're gonna CA git TXT and you can see that this file is actually different 00:16:32.663 --> 00:16:34.973 and it doesn't have that extra line. 00:16:35.123 --> 00:16:39.833 This is a test which we added only on the branch drew. 00:16:40.633 --> 00:16:46.493 so let's open up our GitHub and so we can create a new pull request. 00:16:46.573 --> 00:16:47.863 It's terribly named. 00:16:47.863 --> 00:16:51.011 It should be called merge request and actually git lab 00:16:51.011 --> 00:16:52.931 calls it a merge request for Mr. 00:16:53.681 --> 00:16:53.891 You'll. 00:16:53.891 --> 00:16:55.421 Hear people call it a PR. 00:16:55.811 --> 00:16:59.351 So you click this, create a new pool request. 00:17:00.151 --> 00:17:05.621 button and then you give it some details, added a new line 00:17:06.421 --> 00:17:08.431 and you create a pull request. 00:17:08.941 --> 00:17:13.241 And now that pull request will merge, drew into merge git test. 00:17:13.571 --> 00:17:15.541 And so it's checking. 00:17:15.961 --> 00:17:21.311 And then you can just click merge since you own the repository in a real working 00:17:21.311 --> 00:17:25.661 environment, you'd have to ask for an approval from a reviewer and you could 00:17:25.661 --> 00:17:27.881 assign it to specific people to review. 00:17:28.681 --> 00:17:32.371 In general, though, you've just learned pretty much all the things 00:17:32.371 --> 00:17:36.173 that you need to know to be rather effective with git it really just 00:17:36.173 --> 00:17:37.463 requires a little bit of practice. 00:17:37.913 --> 00:17:44.093 I have been working with developers for years now, and I'm always embarrassed for 00:17:44.153 --> 00:17:50.153 the developers when somebody's trying to tell them how to run, git commands from 00:17:50.543 --> 00:17:55.908 terminal, they git this crutch of using visual studio code, which is great when 00:17:55.908 --> 00:17:57.408 you're working in visual studio code. 00:17:57.408 --> 00:18:01.908 But if you're not working in visual studio code, you have no idea what to do, and I 00:18:01.908 --> 00:18:03.858 want to steer you away from doing that. 00:18:03.918 --> 00:18:09.728 So just as a reminder, the flow is make a change and then 00:18:09.728 --> 00:18:13.298 git, add, git, commit, git push. 00:18:13.358 --> 00:18:15.818 Those three steps are all you really need to know. 00:18:16.028 --> 00:18:19.688 And the rest is all initial setup, which you'll do probably one time. 00:18:19.898 --> 00:18:20.318 And that's. 00:18:21.063 --> 00:18:24.393 If you git stuck where you've created a repository locally, 00:18:24.603 --> 00:18:27.191 that you need to git remotely. 00:18:27.991 --> 00:18:32.191 Just clone the remote repository and then move your changes into it. 00:18:32.308 --> 00:18:34.498 That that's how I would go about it. 00:18:34.498 --> 00:18:36.898 And it's worked out pretty well for me, so far. 00:18:37.698 --> 00:18:40.798 Questions that I've had during interviews was about cherry picking. 00:18:40.798 --> 00:18:44.421 I recommend that you Google this and then also look in the git log. 00:18:44.421 --> 00:18:46.414 I didn't go over this because it's. 00:18:46.679 --> 00:18:51.959 Probably gonna git you snagged and it's not necessary for you to be effective, but 00:18:51.959 --> 00:18:56.189 the git log will basically show you here's all the commits that have happened and 00:18:56.189 --> 00:18:58.319 it'll help you understand cherry picking. 00:18:58.979 --> 00:19:02.429 And that's it for this episode of coding with drew, I look forward 00:19:02.429 --> 00:19:03.479 to seeing you in the next video.