1 00:00:06,020 --> 00:00:11,900 Hello, colleagues, in this lesson, we'll talk how we can ignore files from Geek and how to Ontrack 2 00:00:11,900 --> 00:00:17,210 files if we don't want to get taken snapshots with these files after today's lesson. 3 00:00:17,330 --> 00:00:21,230 Are going to learn what is a technophile and what should be placed there. 4 00:00:21,590 --> 00:00:27,590 Also, I'm going to show you comments that will help us to track files or even the whole directory with 5 00:00:27,590 --> 00:00:33,380 files in it to make sure that we can check, commit history and consult, will learn to then get your 6 00:00:33,390 --> 00:00:36,030 comment and main attributes that it has. 7 00:00:36,410 --> 00:00:41,860 Let's start I will show you get examples on our demo project to Standard Lesson. 8 00:00:41,870 --> 00:00:43,400 I want to ask you a question. 9 00:00:43,640 --> 00:00:45,860 What files you would like to track with get? 10 00:00:46,490 --> 00:00:50,870 Technically, you can track changes in any file, but does it make sense? 11 00:00:51,260 --> 00:00:53,540 Not always in software development. 12 00:00:53,570 --> 00:00:59,090 There is a sense in tracking changes only in the source code and some configuration files. 13 00:00:59,700 --> 00:01:03,470 There is no need to track files that will be generated again during the program. 14 00:01:03,470 --> 00:01:06,330 Compilation like this binaries files in Java. 15 00:01:06,890 --> 00:01:13,490 Also, there is absolutely no sense to store environments specific files like this claspers file because 16 00:01:13,490 --> 00:01:18,380 colleagues of yours may use different development environment and they wouldn't need those files at 17 00:01:18,380 --> 00:01:18,720 all. 18 00:01:19,430 --> 00:01:24,020 Now, when we know this, we understood that in previous lesson we did the mistake. 19 00:01:24,500 --> 00:01:30,320 Don't worry, we did that mistake on purpose so that you could learn additional important comments just 20 00:01:30,320 --> 00:01:30,800 in case. 21 00:01:31,340 --> 00:01:38,360 Imagine that you realized that you don't want to track changes in the binary files in this file because 22 00:01:38,360 --> 00:01:43,550 it is specific only to the special program and have nothing in common with your source code. 23 00:01:43,940 --> 00:01:44,900 What to do now? 24 00:01:45,320 --> 00:01:49,910 We have to tell you to not track changes in that files anymore, starting from today. 25 00:01:50,300 --> 00:01:51,250 How to do that? 26 00:01:51,770 --> 00:01:53,450 I don't want to simply remove file. 27 00:01:53,780 --> 00:01:55,220 That is the easiest way. 28 00:01:55,610 --> 00:01:58,970 I want just to remove this file from the staging area. 29 00:01:58,970 --> 00:02:05,840 But I still want to keep file in my working tree so I could keep using this file to remove files from 30 00:02:05,880 --> 00:02:12,620 GIT, but still to keep them on the local machine, I have to use the get a ram common with cached attribute. 31 00:02:13,190 --> 00:02:22,730 Let's remove this claspers file, type the following and get Basche get around that will Desh cached 32 00:02:23,330 --> 00:02:32,960 dot claspers dot claspers is a file name and you see claspers file is still present in my work entry, 33 00:02:33,470 --> 00:02:35,900 but it is marked as a removed foget. 34 00:02:36,480 --> 00:02:38,330 Let me show you this in good status. 35 00:02:39,610 --> 00:02:45,290 Here you can see that our claspers file is marked as untracked and deleted from the staging area. 36 00:02:45,700 --> 00:02:51,190 Important thing for you to remember in case you will not use cached FLAC, you will remove a file from 37 00:02:51,190 --> 00:02:58,420 your file system to cached means to keep file in your working directory, but remove it from the staging 38 00:02:58,420 --> 00:03:00,260 area to not track it anymore. 39 00:03:00,700 --> 00:03:02,750 Does it make sense now? 40 00:03:02,770 --> 00:03:08,740 Let's discuss what to do in case you accidentally added to the staging area all files from the directory 41 00:03:09,250 --> 00:03:13,740 because removing files from stage one by one could take a lot of your time. 42 00:03:14,350 --> 00:03:20,440 So in case we wanted to remove from the staging area all files from specific directory, we have to 43 00:03:20,440 --> 00:03:28,780 use our FLAC R stands for cursive with this FLAC all files from the specific directory and from internal 44 00:03:28,780 --> 00:03:33,310 directories within that directory will be removed from the staging area. 45 00:03:33,710 --> 00:03:42,220 Let's tibs the following get our ram desh are double desh cached then slash. 46 00:03:43,130 --> 00:03:50,750 Let's check status, awesome class pass fail, and all files from being directory are excluded from 47 00:03:50,750 --> 00:03:51,720 the staging area. 48 00:03:52,220 --> 00:03:59,530 Now I there's a risk that accidentally those files back to the staging area during the next commit to 49 00:03:59,550 --> 00:04:00,100 avoid this. 50 00:04:00,110 --> 00:04:06,950 Let me tell you to ignore these files and directories, to tell you that I want to ignore something, 51 00:04:06,950 --> 00:04:12,980 I have to create a special file without name and with gift ignore extension to create file from the 52 00:04:12,980 --> 00:04:16,460 git bash console type the following touch. 53 00:04:17,000 --> 00:04:23,090 Don't get ignore that requirement in all Linux terminals allows you to create a new file. 54 00:04:23,570 --> 00:04:29,630 Now you can open this file in any text editor or even here in console, for example. 55 00:04:29,640 --> 00:04:35,210 Now you can find it in your file here and you can open it in notepad if you wish. 56 00:04:35,780 --> 00:04:39,020 But I will teach you how to impress your girlfriend or boyfriend. 57 00:04:39,450 --> 00:04:43,250 I will show you how you can use your console to edit text files. 58 00:04:43,700 --> 00:04:46,760 You can do almost everything with the help of console. 59 00:04:46,910 --> 00:04:48,860 You just need to know what to do. 60 00:04:49,430 --> 00:04:50,510 Typing console. 61 00:04:51,190 --> 00:04:53,120 No, not yet. 62 00:04:53,120 --> 00:04:53,630 Ignore. 63 00:04:54,510 --> 00:05:00,090 Nana is the name of the text editor program for Unix like computer systems, which can be used with 64 00:05:00,090 --> 00:05:02,080 the help of command line interface. 65 00:05:02,520 --> 00:05:05,190 Now we can add any text to this file. 66 00:05:05,940 --> 00:05:10,740 We can use Spartan's here, for example, asterisk, dot gloss. 67 00:05:11,230 --> 00:05:16,350 This will tell you to ignore all files with any name, but with class extension. 68 00:05:17,130 --> 00:05:21,290 In our particular case, we want to ignore all files in the folder. 69 00:05:21,780 --> 00:05:27,390 Then let's write, then slash and we want to ignore class file. 70 00:05:27,720 --> 00:05:30,900 So let's step dot pass. 71 00:05:32,020 --> 00:05:38,950 This is enough for us now, let's save this file and regular text editor, you can press control plus 72 00:05:38,950 --> 00:05:40,690 as buttons here. 73 00:05:40,690 --> 00:05:45,190 We need to follow hints that are written down right here to exit. 74 00:05:45,190 --> 00:05:49,510 Now, a text editor, I have to press control and X simultaneously. 75 00:05:50,140 --> 00:05:52,630 It asks me whether I want to save the file. 76 00:05:53,230 --> 00:05:58,120 I click Y button now it asks me to check the file name. 77 00:05:58,570 --> 00:06:02,660 I keep it the same yet ignore and just press enter button. 78 00:06:03,310 --> 00:06:03,950 Awesome. 79 00:06:04,090 --> 00:06:06,550 Now we have get ignored in our repository. 80 00:06:07,000 --> 00:06:08,470 Let's check the status. 81 00:06:09,390 --> 00:06:10,180 We see the difference. 82 00:06:10,180 --> 00:06:13,630 Now you just ignore that directory and files. 83 00:06:14,110 --> 00:06:20,290 It even does not tell me that directory or claspers file is untracked like it told me before. 84 00:06:20,950 --> 00:06:23,200 It just ignores these files. 85 00:06:23,800 --> 00:06:28,240 By the way, you'd has a collection of getting our files for different programming languages. 86 00:06:28,450 --> 00:06:31,180 I will leave this link and attachments to this lesson. 87 00:06:31,540 --> 00:06:35,440 In my opinion, these files are a good starting point for your own good ignore. 88 00:06:36,040 --> 00:06:41,680 But based on what I saw in these files, I can say that for many languages these technologies are not 89 00:06:41,680 --> 00:06:42,700 completely perfect. 90 00:06:43,330 --> 00:06:46,240 Most likely you would need to adjust it in your project. 91 00:06:46,660 --> 00:06:53,830 But as I said before, it is a good starting point now when I'm totally sure that I ignored all files 92 00:06:53,830 --> 00:06:54,880 that I don't need. 93 00:06:55,060 --> 00:06:59,740 I can add all files to the staging area without any fear all the time. 94 00:07:00,310 --> 00:07:03,880 Usually I will use just add comment was not like this. 95 00:07:04,480 --> 00:07:05,980 Get at DOT. 96 00:07:06,930 --> 00:07:10,450 Because I added to the gift, ignore everything, what I wanted to add. 97 00:07:11,130 --> 00:07:12,840 Now let's commit our changes. 98 00:07:13,290 --> 00:07:16,380 Always remember to write a message that makes sense. 99 00:07:17,010 --> 00:07:22,750 In other lesson, I will tell you best practices for writing comit messages so that each your colleague 100 00:07:22,750 --> 00:07:29,790 could understand your comments get conveyed that I am added to get ignored and removed. 101 00:07:29,800 --> 00:07:31,110 Been from Stadion. 102 00:07:33,890 --> 00:07:40,890 Press enter cool, and the last thing I wanted to show you today is how you can check your cammed history. 103 00:07:41,480 --> 00:07:46,820 You might want to investigate it history just to check what happens and where you are in your project 104 00:07:47,420 --> 00:07:48,800 to check this type. 105 00:07:48,800 --> 00:07:55,300 Next comment, get luck, get log prints to your comment, history of the car and get branch. 106 00:07:55,310 --> 00:07:58,190 In this case, this is out of the master branch. 107 00:07:58,550 --> 00:08:05,420 And you see that from the first lesson we already created three chametz here by default get localist. 108 00:08:05,510 --> 00:08:12,260 The comments made in that repository in reverse chronological order, that is the most recent comments 109 00:08:12,260 --> 00:08:13,550 show up first. 110 00:08:14,150 --> 00:08:21,350 As you can see, this comment list each comment with its checksum, the author's name and email that 111 00:08:21,350 --> 00:08:23,450 they'd written and the commit message. 112 00:08:24,080 --> 00:08:26,630 There are numerous options for Gitlow command. 113 00:08:26,870 --> 00:08:32,360 I'm going to show you only the most helpful options which can help you to get necessary information 114 00:08:32,360 --> 00:08:33,440 during the development. 115 00:08:33,980 --> 00:08:37,490 For example, you can limit the amount of comments that you want to check. 116 00:08:37,880 --> 00:08:44,840 In case I care the most about loss to commit, I have to type the following gig log dash to. 117 00:08:45,560 --> 00:08:50,530 I believe you understood that you can change number to change the amount of commands for review and 118 00:08:50,540 --> 00:08:52,640 as a practical attribute is a formatting. 119 00:08:53,090 --> 00:09:02,120 For example, you can type you'd log double dash pretty equals one line and you can see on the checksum 120 00:09:02,120 --> 00:09:03,380 and conveyed message. 121 00:09:03,840 --> 00:09:08,930 There are multiple other attributes that can allow you to print commands following specific pattern 122 00:09:09,080 --> 00:09:14,900 or to print commands that are related to changes in some specific directory or shortcomings in specific 123 00:09:14,900 --> 00:09:15,230 date. 124 00:09:15,470 --> 00:09:21,920 But in my humble opinion, those options are not used in daily basis because probably there is a lot 125 00:09:21,920 --> 00:09:26,330 of sense for you to print its history in specific format, for example. 126 00:09:26,960 --> 00:09:33,020 But from previous lesson, you remember how to use Get Help command to learn more from documentation. 127 00:09:33,740 --> 00:09:39,230 Meanwhile, we'll keep focus on the most powerful and useful commands that will help you in everyday 128 00:09:39,230 --> 00:09:39,980 activities. 129 00:09:40,640 --> 00:09:43,580 It's look like that's all what I wanted to share with you today. 130 00:09:44,000 --> 00:09:46,100 Let's recap what we have learned today. 131 00:09:46,670 --> 00:09:48,620 Today we learned a lot together. 132 00:09:48,950 --> 00:09:54,110 We learned how to tell you to stop track changes in specific files or directories. 133 00:09:54,440 --> 00:09:58,700 Now we know how to tell you to ignore changes in some specific directories. 134 00:09:59,150 --> 00:10:05,180 After today's lesson, you know how to create GUI Technophile that will work for your specific project. 135 00:10:05,540 --> 00:10:10,490 And at the end of the lesson, we learned how to investigate our committee history. 136 00:10:11,300 --> 00:10:12,440 That's all for today. 137 00:10:12,950 --> 00:10:16,070 Thanks a lot for your attention and see you in the next lesson.