1 00:00:00,150 --> 00:00:08,070 Hello and welcome to this video in this video, I'm going to add all the falls from my project to my 2 00:00:08,070 --> 00:00:10,390 local gitte repository. 3 00:00:10,410 --> 00:00:15,080 This is the new directory I created for my online deployment. 4 00:00:15,090 --> 00:00:22,170 Have all the files in there that I want deployed and have opened up the directory in my text editor. 5 00:00:22,200 --> 00:00:28,460 So all those files here, I'm going to add to my local git repository. 6 00:00:28,470 --> 00:00:34,050 So the first thing I need to do is create an empty kit repository. 7 00:00:34,060 --> 00:00:40,710 Once I've done that, I will then add all this files to that local repository. 8 00:00:40,740 --> 00:00:45,390 Open up your command prompt if you on the Windows computer or your terminal. 9 00:00:45,390 --> 00:00:54,600 If you are on a Mac, make sure you are in your project directory before you initialize the kit repository 10 00:00:54,600 --> 00:00:57,180 so you can see my project directory here. 11 00:00:57,210 --> 00:00:58,980 Thus, the directory on my desktop. 12 00:00:59,760 --> 00:01:02,940 This is represented in the command prompt. 13 00:01:03,090 --> 00:01:08,660 The first and I need to do is to initialize an empty gate repository. 14 00:01:08,880 --> 00:01:16,800 The command to initialize and create an empty git repository is kit space in it. 15 00:01:16,950 --> 00:01:23,340 Once you've Typekit in press, enter on your keyboard and that will create an empty repository you can 16 00:01:23,340 --> 00:01:24,390 see tells you here. 17 00:01:24,390 --> 00:01:29,700 An empty repository has been initialized and it tells you the path. 18 00:01:29,880 --> 00:01:36,300 If you open up your project inside your text editor, you'll notice that all your files and folders 19 00:01:36,300 --> 00:01:37,350 are going green. 20 00:01:37,360 --> 00:01:44,790 All the files for the green here can be added to the gate repository. 21 00:01:44,790 --> 00:01:50,460 To add all the files from my project directory to the kit repository. 22 00:01:50,470 --> 00:01:55,280 You type in this command, get space, add on space dot. 23 00:01:55,290 --> 00:01:59,490 That means it will copy all the files in my project directory. 24 00:01:59,520 --> 00:02:04,440 Once you've entered that command, press enter and the files will be copied across. 25 00:02:04,470 --> 00:02:10,890 If you notice all the files here, I've got a next to the air here. 26 00:02:10,950 --> 00:02:19,920 On the side of the files basically means that we can add all the files to the staging area to check 27 00:02:20,070 --> 00:02:24,360 the status of the files we've just added to the kit repository. 28 00:02:24,720 --> 00:02:33,660 We type in the command gate space status and press enter and that will tell us all the files that have 29 00:02:33,660 --> 00:02:36,460 been added to the repository. 30 00:02:36,480 --> 00:02:42,750 So at this stage, the files are not confirmed in the repository yet. 31 00:02:43,110 --> 00:02:48,810 They've been copied to a staging area, so they are currently in the staging area. 32 00:02:48,810 --> 00:02:57,390 So in order to commit them to the local git repository, we have to issue another command. 33 00:02:57,540 --> 00:03:07,440 The command required to commit the files to the local kit repository is gate space, commit space, 34 00:03:07,440 --> 00:03:11,700 dust em the dust and basically is a message flag. 35 00:03:12,150 --> 00:03:20,970 It allows you to add a text message to the commit operation, so the message of that is first commit. 36 00:03:20,990 --> 00:03:23,890 Once you've done that, just press enter. 37 00:03:23,910 --> 00:03:30,630 As you can see, the files have been committed to the main route is called master. 38 00:03:30,990 --> 00:03:35,790 You can see the message I attached to it, which is called first commit. 39 00:03:36,180 --> 00:03:42,090 So now all our files are now in the local git repository. 40 00:03:42,120 --> 00:03:46,150 If you type in the command gate space status, you can see here. 41 00:03:46,170 --> 00:03:52,080 After issuing the command gate space status, it tells you here there's nothing to commit. 42 00:03:52,290 --> 00:03:59,340 Everything is clean because we've already added the files and committed them to the local repository.