Git class | Zero to professional | Michal Hucko | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Git class | Zero to professional

teacher avatar Michal Hucko, Python | Docker | Kubernetes

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

21 Lessons (3h 35m)
    • 1. Intro

    • 2. What is git

    • 3. Installation

    • 4. Vscode setup

    • 5. How it works

    • 6. Git init, git add

    • 7. Git add, git commit

    • 8. Git rm

    • 9. Git mv

    • 10. Git branch

    • 11. Git merge

    • 12. Github

    • 13. Git clone

    • 14. Git pull

    • 15. Git conflict

    • 16. Gitignore

    • 17. Git reset

    • 18. Git tag

    • 19. README

    • 20. Git behind the scenes

    • 21. Project

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

In this class I will teach you essentials of Git. Git is an open source version control system used mainly for source code management. Git knowledge is important if you plan to apply for a software development job position. This class will teach you Git from scratch. No prior knowledge is required.

This class will explain important git concepts from the scratch. Through the class we will also cover more advanced topics of Git (e.g. handling conflicts, detached HEAD state, mechanism behind the scenes and many more). I would recommend this class for beginners and advanced programmers who are interested in mastering the git.

To help you better understand the practical application of git we will use Visual Studio Code with some popular git extensions. Visual Studio Code is an open source free to use code editor. It is one of the most worldwide used editors nowadays. 

To be able to successfully complete this class no prior knowledge is required, however we recommend at least some basic knowledge of programming. Within the class we will cover these topics:

  • What is git and how it works
  • Git installation (Windows, Mac)
  • Vs code installation (Windows, Mac)
  • Git basic commands (add, commit, branch, checkout, reset and many more)
  • Git branching mechanism
  • Git merging
  • Handling conflicts
  • Working with remote repositories 
  • Git fetch vs pull
  • Working with the GitHub application 
  • Gitignore 
  • Git tags

On this GitHub project you can find my VsCode config file plus a list of most useful git commands I will use during class.

Hardware requirements (no special computer is needed):

  • Desktop or laptop (Mac, Windows or Linux)
  • At least 4GB of RAM
  • At least one CPU core 1GHz+
  • No GPU needed

If you are looking to get more into coding, here is my Python from absolute beginners class. 

Meet Your Teacher

Teacher Profile Image

Michal Hucko

Python | Docker | Kubernetes


Hello world!! My name is Michal Hucko and I am passionate python developer. I am former university teacher. I was doing my Phd degree in computer science, however because of unfortunate situation I decided to currently postpone the study. Thats why I want to teach computer science online. Hope I can help you to understand the modern world of machine learning and distributed computing.

Besides programming I like to spent time with my wife, my brother and my friends. I am passionate fitness guy and sometimes I play computer games.

About my engineering career

For past 5 years I am working as a machine learning dev ops developer. I am working mostly with docker, kubernetes and python. Currently I am working for one of the biggest computer company in the wor... See full profile

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Intro: Hello, my name is Mikhail would SCO and welcome to my gate glass. In this glass, I'm going to teach you how to use software to get good is a software version controlling system which helps you to store versions of your code or to share your code with rest of the team. It's a distributed system. In this class, I will start with the basics. We're going to talk about topics like good commits, get the branches, good changes, good marriages, and staff like this. Later we will go for more advanced topics like conflicts, manager requests, or we're going to talk about how Git works behind the scenes if you are interested in this stuff, this is exactly the class for you. I don't say that this class is dedicated at the beginning for beginners, but later we will go for advanced topics which are suitable for more professional programmers who already use good daily. I am using daily as a machine-learning DevOps developer in the international company. During this class, I'm going to use a tool which is called Visual Studio Code, where I'm going to show you how you can integrate your good solution. We will use some extension within these visual Studio Code tool, which will help you to use the get more efficiently. If you don't know what is Visual Studio Code, you don't need to worry because I will explain how to install this tool on your Windows or Mac devices. I hope guys, you are interested in it, and I hope I will see you in the next lecture. 2. What is git: Hey guys, my name is Mikhail hoods go and in this lecture we're going to talk about what these gate, what is it used for, and what are the main advantages of good? So get is an open source distributed version controlling system, which was developed on seventh of April 2005. So that was the initial release. The biggest or the main altar of good is a Linus Torvalds himself. For those of you who are familiar with using operating system Linux or some Linux distributions are Linus's very familiar. In this lecture, we're going to talk about why is good so popular, why you should learn it, and why you should continue with this course. So whatever programming language you will be programming with or whatever software system you will be developing. You will need to somehow break up your code or you will need to somehow share your code with the rest of the team. These are just few problems which get is trying to solve so good as a version control system helps us to store our code. So the first use case we will explain with an example. Imagine you are working in a software company writing Python code. And every day you are writing some code in your laptop. At the end of the day you are storing or saving your code only to your laptop. This is very dangerous. What? If you break your laptop, you will lose your code. So you need to somehow store your code somewhere. And gate provides us these functionality to store our cold somewhere or share this quote with the rest of the world or rest of your team if you are working in a company. The next thing what I want to talk about this, that git is a distributed system. Let's talk about this. The opposite of a distributed system is centralized system. Centralized meaning that there is a one central repository for your code. When we are talking about the code, you need to keep in mind that good is not just working with the code, get is working with files, any kind of kind of files. This is the great advantage because of these property of good gear is able to work with every programming language in the world because it's looking on the source code as on the files. So back to the centralised system. So centralized system means that there is a central repository where we store this code. And this can be a problem because what if this repository is on server which breaks or there is a network issue, no one can access the code. Get, on the other hand, is a distributed system, meaning that the code is distributed across a network of nodes. When we talk about notes, we talk about computers of your colleagues, and we talk about some servers where you can potentially become your code. So as you can see, the greatest advantage of distributed system is that you can be sure that there are multiple copies of your code somewhere in the network of nodes. Meaning that whenever there is a network failure and you lose some data from one of your servers, your colleague can give you the whole copy of the whole codebase of your company and you need to, you know, sleep well during the nights. Don't worry about the network failures. Next thing, what is he trying to solve is programming in a team. Imagine you are working in a company with one of your friends, John. You and John are working on the same file, let's say same Python file, where are bunch of functions? Your task is to change function a and function B in this file. And Jon's task is to change function C and D. You are working simultaneously at the same day, at the same code. And the end of the day, your task is to merge both of your code into a single file. Rest of the changes which were done, for example, by your other colleagues, let's say a hundreds of colleagues who are working on the same file at the same day. How would you solve this problem? Maybe you'll set up a meeting where you will go through your code line by line and he will spend a lot of time merging these changes. Get helps you here, Good provides you tools which makes this merging process much easier. We will talk about these features later in the lectures. So these were the main advantages of the good. The next thing, what I want to mention is that good is an open source project. Open source means that you don't need to pay for this. And you can go to the Internet and you can find the source code of gate itself. Yes, Good, This is software, so it means it's programming, programming languages and it has its own source code somewhere. When you go to the gate and you write down to Google, Let's say good source code. You will find the GitHub repository where you can find the source code of Git. Git is written mostly in programming language C, but you can find there a lot of shell scripts and scripts in other programming languages. Feel free to check out. So guys, this was just an introductory lecture. I hope I will see you in the next lecture. Thank you. 3. Installation: Hello, my name is Mikhail hoods. Go, Welcome to another lecture in our course. In this lecture I'm going to show you how you can install Git in your Windows machine. Later in this video, I will show you instructions how to install Git in your Mac machine. Or you will also find here some instructions how to install Git on your Linux machine. As I mentioned earlier, get is a software, and in order to run the software in your computer, you need to install this in Windows. In the process is little bit different than in the Unix-based systems like Mac and Linux. In this video, we will start with the windows. In order to install need in your Windows machine, you need to first install the setup wizard. In order to download the good Sita wizard, you will go to Google and you will write down there like Git installed Windows. Yeah, I like this keyword search. So the first result here is like Git This is the official website currently for good, if you're watching later this video, you should obey the steps. And that's the reason why I'm showing it like this in order to get the installer for you because maybe in the future something will change. There will be a different webpage and so on. The reason why I'm showing you a step-by-step guide how to get it through the Google. You click here and you will be directed to this page. So in the middle here you can see couple of options you have for downloading. We will concentrate for Git, for Windows setup. Yet there's this other option, but we will go with Git for Windows setup for today. There are two options, either 32 bit Git for Windows setup or 64-bit Git for Windows setup. If you are having a machine which is older than 2000, I don't know, ten or something like that. It's very likely you have the 64 bit system in your computer. So feel free to go ahead and click on the 64-bit. If you have some very, very old computer may be you have the 32-bit version. Feel free to download the 32-bit, okay, we go with 64-bit, as I mentioned. So you click on here and this will download for you the wizard. And as you can see, it's at the left bottom corner because I'm using Google Chrome. If you are using the different browsers, it can be at the top corner or somewhere else. Somewhere like this, you can find the result in your downloads folder in your computer. So after downloading these, I'm clicking on the wizard and these will pop up me a message from my Windows asking me you cannot see it right now, but I see it. Like if I want to install it, I press yes because I already have Git installed in my machine. The steps will be little different. And your machine, when you are installing it for first-time, you know the process will be different. And because I want to show you everything step-by-step, I decided to create this presentation, which I will show in a couple of seconds. But this first window is generally are the same for updating, diversion and installing for first-time. So these are just like at least license agreement, blah, blah, blah, stuff. You click next. The whole process. I don't I'm not going to install it because I have it already installed, but I will show you step-by-step guide with the presentation in a while. You know the whole process is just about clicking Next, Next, Next and the end, clicking on in style, but it's quite longer and I want you to feel safe. So that's the reason why I created this presentation. After clicking Next thing, you know, agreement section, you will be prompted with this window asking you what parts of, you know, these installer do you want to install on your computer here? Makes sure that the Git Bash sticked. Feel free to also take the good GUI version here. You know, a couple of my friends were like persuading me not just to show these to, you know, tutorial with the command line, good, and show something more, you know, graphic user interface like. But I decided not to use this good Gou Gui. But during this tutorial or during this course, you will see examples where I'm going to use Gita with connections of Visual Studio Code, which is a very nice software for software development. So you will see also some, you know, gooey stuff, but you now feel free to take here the GUI if you want to leave it as it is and click Next. After that, you will be prompted on specifying the folder names, KP, the cityscape. Here you will be asked for which, you know, editor you want to use with the IT-related stuff. Leave it as default. The default is something which is called Veeam. It's a software for writing software. So it's an alternative to Visual Studio code or some jetbrains products. Leave it as Vim because most of the time when you will be working with good people will be using Vim. So I don't want you to be surprised when, you know, someday we'll be working on some server every good and suddenly you will be prompt with a win. And because you will be not experienced between because he will be always using some Visual Studio Code. You will be scared in order to learn you as much as possible. We will leave this as vim and click Next. As you can see is just default options. Here you let the good decide for naming your branches, master and main conflict. I will talk about this later in these lectures. So feel free to just like click Next and leave it default. This part is also default. This will just allow us to use good via third party software like Visual Studio Code, the nurse. In our case, we will use an OpenSSL library. So the default one for validating the certificates. So we will put more and more about the public key encryption which is used behind the scenes on Git. In later sections, so feel free to leave it. The next thing is also the File Check window of style, gamete, Unix style line endings. This is a big problem when you are working with the team and someone is using windows and some other guys using Linux because files in Windows have different line endings then compared to Unix. So this option is somehow mitigating this issue, but it's not 100 percent all the time. So we leave this default. This is helpful. Again, these parts, so mean TTY we're going to use for Git Bash. We'll talk a little bit about kit-based shortly. Leave it default, and click Next, and use the Fall Festival of our marriage. And Git Credential Manager is also default. And at the end V enable file system caching. This will help to optimize the whole performance of kidney or computer. The last part is Enable experimental support for consoles. Well, we will leave this antique because currently it's just in the experimental stage. But if you are watching this video, I don't know, like couple of years in the future and you will have here version either note too that I don't know, 40 or something like this. Maybe this will be default. So if it is default, leave it as default. I'm not going to show some experimental features right now because this is a tutorial for absolute beginners or some advanced programmers which want to learn gate. So after clicking on in style, the goodwill thick, it will take some time. You will see a progress bar. It will take about two to five minutes. And after that, you will have your Git installed. Now, how are we going to check nickel the installation of getting our computer, it's quite simple. In you click on New York, Start menu, the left, bottom corner, and you right there, C and D. This will open as command line for Windows. And when we put here, get the version. You will see that currently I'm using to that 28 dot 0, but the up-to-date version is to that 31. So if it's too that something you are safe. If it's higher than 28, it's fine. If it's little bit lower, it's fine. You are safe. So we're going to use this version right here and we are saved because now as we can see, VC, the version, so everything is installed in VR. Fine. Before finishing this video, I just want to tell you that a width the gate, you also installed something which is called the Git Bash. So if you click on your own again, Start Menu and you put there, good, very good. You will see this Git Bash software. This kit-based software is very helpful and I like it now, in order to understand what it is, you need to understand what is a bash. Bash command language which is used in Unix-based systems like Mac and Linux. And we, you know, software developers really like this bash in order to make our lives easier on Windows machines. And the good the developers decide to create these Git Bash emulator because windows out of the box doesn't support the Bash. So in order to help us, they create this emulator, which is like emulating the bash in the windows. It's very helpful. Basically wheel around here git commands. So you can also put here git version again and you will see that you have Git installed also hear, fine. So these were the instructions for a Windows. Next we will talk about the Mac and Linux machine. So let's go to the Make part in this part of the tutorial, I'm going to show you how to install Git on your macOS devices. I have here my old Macbook Pro. In order to install some software into the mic. I'm using mostly cm2, which is called Homebrew. Homebrew helps you to install some programming language software and programming specific staff. If you are familiar with macOS and you are some software developer there, you are maybe familiar with homebrew and besides using it on a Mac, you can also use it in Linux machines. So we are going to install Git using the Homebrew. Homebrew itself is a software. So we are going to use the software to install another software. So as you can see, I'm here in my home screen, nm among web page which is called brewed at the sage. This is all official web-page of Homebrew. And in order to install Homebrew in your macOS devices, you just need these comment which is here, you just need to go Control C it, yes, copy it. And we are going to run it in a tool which is called a terminal. Previously I showed the Git Bash terminal in my Windows machine, which we are going to use in Windows machine. But when you are using macOS for this tutorial for the rest of the lectures, you can use macOS terminal in order to access my question monopolies use a shortcut key, shortcut command space, and write their terminal. This will open a new terminal window, which is very similar to Git Bash. I have here in black, but maybe you haven't been widely depends on your version of your macOS. Sewing. First, we need to install the Homebrew to later installed the gate with the Homebrew. So in order to install the Homebrew, we get this command which I already copied. But just to be sure, Control C one more time. I put it here and press Enter. I have Homebrew already installed in my device, so am I England running? It will take just a couple of minutes, maybe more. And when it finished, then what you will do, you will see again these command prompt with the name of your computer stuff, blah, blah, blah. And to evaluate the installation of brew, write down the command brew dash, dash version. As you can see here. The, sorry, I, I, I forget the are here. As you can see, my computer, I'm running brew version 3, that one, that nine, which is quite older, maybe you have a newer one, it doesn't matter. So now, as we see the version, we are able to use Homebrew to install different software in order to install Git video homebrew, write down command brew install. I will clear the window for you. So brew install and get. Because I have good already installed through the homebrew, I will have a warning that I have good already installed in my computer. But when you leave this command running after a short time, you will have your getting starting your mega is computer. For the rest of the tutorial, I will use mostly the Windows machine. So I'm going to use there the good bashing and Visual Studio Code and stuff like that. But if you are using macOS devices, you can run each of the commands, which I will inside this terminal. And also I will show how you can set this up with your Visual Studio coding and MSc in the later lectures. To sum up this lecture, just evaluate the version of your gate which you have installed with running git dash, dash version. So the same command as I showed in the windows, but, and as you can see, we have the two that 31, that one. So this is a higher version compared to the version which I have in my Windows machine. So this is everything for the macOS lecture. Thank you very much for watching. I see you in the next lecture. 4. Vscode setup: Hey guys Michael, who's coherent. Welcome to another lecture of our course. In this lecture, I'm going to show you how you can set up tool, which is called Visual Studio Code for working with good. Now as I mentioned, I really like to work with the command line, but some of you or some friends of mine said it's a better idea to show people how to use tools. We saw Studio Code is a very powerful tool which I like to use during my work time and for my custom projects. And that's the reason why I decided to show you how you can work with get inside of Visual Studio Code. But in this video I'm going to show you how you can install. They're the most important extensions for working with good. Okay, let's start with something very simple. I'm going to show you how you can download the Visual Studio code. So when you are in your Google, please write down their VSCode windows download. Okay, so first I'm going to show you how you can install it on Windows, but it's very similar format. During this video I'm going to show you also steps for download again for Mac so you don't need to worry. So VS Code windows dialog, okay, the first result and the webpage of the result is always important, says like code that Visual Studio Code that com. And then there is a download so called Visual Studio Code, or Visual Studio that come the official webpage for Visual Studio comb. So you click here and here you will see a couple of options which you have for downloading. And because I'm running a Windows system, I will click on the System installer 64-bit because I have a 64-bit system. If you have some other system, feel free to download it from here. And this is exactly the same for Mac. So if you're using Mac, you can click here on these big button in the middle. And these will download the installer into your computer inside your Mac or, you know, Ubunto in case you are using, you won't do or any other stuff. So I'm installing the one system installer for Windows 64-bit. In a couple of wild, it will start to download in the left bottom corner, you can wait and you can install it because I already have Visual Studio Code installed in my computer. I'm not going through the steps as last time because these installation is very simple. You are just pressing next, next, next, next, finish. Everything is ready. Okay, so now after downloading and installing Visual Studio Code, you have it in your computer and how you can launch it, how you turn it on. In order to do this, you click on your start menu and you put their string VS Code. Vs Code is a short-term for Visual Studio code. So a lot of people are using it, get used to it. So Visual Studio Code, you will open the Visual Studio Code. Then you will be greeted with a window like this. This is welcome window. And this is the Visual Studio Code atoll, which we're going to use for writing the code and for handling the good. Okay? Now, before we move on, I want to say one important thing which I didn't mentioned in the previous lecture, when you installed gate, and this is strictly regarding the windows, okay, if you are using Mac, everything is fine, life is easy. You don't need to worry about the setup. If you are using Windows, you want to use these good bash, Git Bash, which I showed in the previous video. Okay, so instead of using PowerShell, it's a tool for Windows. We will use a Git Bash. Why? Because I like Git Bash and I think it resembles the Ubunto or the Linux systems which I like, and I like also MACOS. So that's the reason why I decide, okay, I'm going to show you how I do it on my way and how I do it during my work time. So first we are going to set the Visual Studio Code to use Git Bash. So how to accomplish this when we installed in the last video, the good bash, the Git Bash was installing the location, the SPC, see Program Files gate, okay, and here are all the scripts for good. And inside these bin directory, there is this executable for Bash. And that's the Git Bash which we want to use again in this video, I'm going to show you how you can take this executable and integrated inside your Visual Studio Code. But before we move there, I mentioned that we are going to use some extensions. You can think of extension as applications in your mobile Visual Studio Code right now is empty without any extensions is of course a half some of them. That is the reason why I have a different panel here. But in your case it's very empty. I'm going to show you how you can install those extensions. It's quite simple. Okay? So in your, let's say Android phone, you have this Google Store application or app store in case of iOS, right? And if you want to install some application into your mobile, you are going there and you're just downloading it one after another, right? The same applies for Visual Studio Code. There are bunch of people writing different extensions where resource Studio Code, it's up to you which one you will choose. And if we want to work with good, there are a couple of great ones which I want to show you. So how do we install extensions here in the left pane, you have these very nice icon of Foursquare. It's, it's called extensions. So you click on the extensions button here and you will be greeted with the search bar in the top corner. Okay? If you have very small, there are no icons, okay? If you, if you make it bigger, there are some icons. So what are the extensions which we are going to use? You can see I have couple of those installed because I'm working with Kubernetes, estab blah, blah, blah. This is not about Kubernetes we want to get, okay, So E-jet, the best one you put here get lens guidlines is an essential tool. You need to have it in order to install Git glands. You put here good lens and here is a good lens application. Maybe the application will change in the future. So don't be confused. The important part is like there is at least nine plus million downloads, okay, don't get confused with other applications. There are five-stars. Five-stars applications are the great, greatest one. In order to install in the middle, you will see an install button because I have it installed. I have uninstall button or disabled button. Okay. So here is the place where I can uninstall my staff also if I want. So this is the first extension. The second extension which we are going to use. It's something which is called the good graph. So when you put here good graph, we will get these fancy extension. It's very nice. More than 1 million downloads, five-stars. I like it. It helps you to visualize the commits and branches which I will talk later in the lectures. Okay, so please download it. This will help you to understand it better, okay? Again, install and enable, okay, when you see these two buttons after dead here you are fine. You set it up properly. Now we can close this part, then we can go back to the Explorer part. And the next important step is the actual integration of Git Bash and your Visual Studio code. If you are on Mac, you don't need to worry about this. It's already set up. You are out of the box using the terminal, the Mac terminal. The same applies for Ubunto or any kind of Linux distribution unit. You don't need to worry about these. So how do we integrate the terminal? In order to integrate the terminal, you click left on the manage pain. And from the manage pain you click on the Settings and you will be greeted with this very fancy menu. But we don't like menus because VR programmers write you like coat. We'd like scripts. How do we change this view? Here in the top-right corner is this button called settings JSON. And when you click on it, you will be greeted here with something which is called the settings JSON. This is just the programming way how you can set up your setting instead of using that, well, that ugly menu, which we don't like. Okay, as you can see, I have hit the zoom level. The zoom level is just the level of Zoom which I have. So if you if you don't have either, you don't need to worry because you didn't you didn't zoom in your view. Okay, so don't be confused. Now, in the description of this video, you will find the link to my GitHub repository. In this GitHub repository, there are some files in one of the files is called the Visual Studio Code something. And there you will see the settings which I'm going to write here. Okay, I will just copy paste it there because I'm too lazy to read. You don't need to write those. Okay, so go there and control. See them. Go back to your Visual Studio code. Put here column. Don't forget the column. Press Enter Control V. Make sure at each, at the end of each line is a column here doesn't need to be a column. Now, let's go through these, through the settings which we are going to use through the rest of the course. Most of these settings are just visual. You don't need to have offensive Israel as I have, but I'm fancy programmer, I like my offensive as well. So here I have like Windows or level 2, okay, just to be zoomed in so you see everything with I'm writing, but when I'm working in work I have it may be zoomed out. Right. Because like, I don I don't want to be zoomed in. That's something I don't like. So here we have editor, multi, multi cursor, modifier. This is like saying like how you are highlighting stuff inside your Visual Studio Code editor snippet suggestions. That's the place where the suggestions will appear at the top, as you can see, you have this text on the top of my cursor, which I like. Editor format on Pais means when you copy the code, it will be automatically formatted. We like it. Then we are using color theme, which is called solar, solarized dark. You will see shortly how the theme, theme, or the colors inside the Visual Studio code will change. The law is dark is my fancy theme team, which I like. Feel free to choose anything you want. And then we are setting up this VS Code icons. I didn't show you the VSCode icons, which we will shortly in style, our icons which vis-a-vis as code we'll use. Okay, so feel free to skip these. You don't need to have it there, but these two slash files are important. The first line is saying like please, instead of using the out-of-the-box shell which you will use. It's a PowerShell, be going like PowerShell, use the Git Bash and this is the location which I showed you which was installed in your computer in the last lesson. Then we are also saying, turn on the autosave option because out of the box, Visual Studio Code is not saving anything. You need to press control S or Command S If you are on a Mac machine rate. So we need to set this to after delay. So Visual Studio code will automatically save these. I remember always said these two after delay. Because when you will have it on your Control S, you will have a lot of headaches. You will be having strange behavior in your code. We want to set these after the light. Now you press Control S and S. You will see the whole visual of your Visual Studio code will change. But because we forgot to install this extension, let me just show you one more extension which you want to install. So go back to extensions and put here VS Code icons. Viscoat icons are just fancy icons for your staff. Click here in Stalin, stalin, you are done. Okay. Don't forget to install it if you want to see the same thing, which I see, Okay, So you can close it. You can go back here. Now that we sit up everything we are ready to develop, okay, so you can close this, close this, it's automatically saved. So how do we develop? In order to develop Visual Studio code needs to be pointed in. Two, are pointing on a folder in your file system. So in order to achieve these, I create the folder in my file system, in my documents. I have there a tutorial section and here I created a good tutorial folder. So I want now point the Visual Studio Code to that folder. And how do we do that? You could click on the File option and you click on the Open Folder option, and then you will navigate to documents, tutorials. If you are creating it there, feel free to put it in your desk, on your desktop. I wouldn't rather recommend that. I don't like putting things on your desktop. It's a bad practice, but feel free to do whatever you want. Yeah. And then choose the folder that you want to open. In this case it's AKI tutorial. Put, click the Select Folder, and now Visual Studio code will automatically open this folder so you can use it. Okay, perfect. We set up everything. We are ready to work on our code. And now you will see a view like this. And now how do we interact with good from this view, from the Visual Studio code, one thing to do is clicking on the terminal option and opening here at terminal. And because we are right now in Windows and we set up the Git Bash automatically. This will open for us a Git Bash. When you put your good version, you can see that from inside these beautiful part, we will be able to interact with good software. This is the whole setup for Windows. In case of a macOS, you don't need to set up these terminal in your settings file. You just need to set up in the settings of the visual. If you want to have these fancy blue think and amazing icons, It's up to you, right? And when you will click on the terminal automatically, you will have here the terminal from MacOS, which I was showing you in the last video. So and the same applies for any kind of Linux distributions which you are adding our fade or I don't know, ubuntu, CentOS, Papez, whatever. Okay, So this is the setup for VS Code. Now, if you forgot to set these best thing, you will see this thing I will show you. So I'm going back to settings and I'm coming thing this line. So it doesn't apply. Now, I will just close this and open a new terminal. And you see that out of the box, Windows is using PowerShell as a terminal. We don't like PowerShell. Why? Because we like Git Bash. Good bet she's emulating the bash and we like Bash in the Linux distributions. So don't forget to put here this option, okay, and the after delight, This is important option, fine. Now, after installing the extensions you will have here the source control, a pain button. This button will be essential for the future which we will use. That's everything from this lecture. Hope you set up your environment correctly. Feel free to reach out to me if you have any problems or any issues during the installation. These first two videos were very essential because afterwards we are going to use these tools for developing our code and for the examples which we will solve through the rest of the lectures. Thank you very much for watching. 5. How it works: Hello, my name is Mikhail Hook School and welcome to another lecture of our good tutorial. In this lecture, we're gonna talk about how good works behind the scenes. So let's start with coding. So what is coding? Coding is basically writing a text into a text file, right? And that's what we are doing daily as a programmers. Now, SV write the code. We are constantly updating these files. We are slowly adding new lines and we are slowly adding new words and stuff like this. These words in lines behind the scenes or in reality are some functions which are then evaluated by some compilers or interpreters as we are triggering our program. Now, when we look at the code itself, we are basically adjusting files. So we are doing changes in the files by adding new lines, adding new words and stuff like this. Now, imagine you are working on a project, right? And you are asked to write a code in Python, let's say in Python, I like to show examples in Python because I prefer writing code in Python, but you don't really need to understand Python to go ahead with this a tutorial or with these license, right? Feel free to just listen to a look at the examples and then apply this knowledge to your programming language. So you are asked to write a code in Python which will output just a simple hello world. So how will you start? So first you will create your working directory or, you know, your directory where you will write your code the same way as in the last video I showed you that I created the good tutorial folder and I open it with the Visual Studio Code, right? So inside there you will create a file, a file where you will write your code, let's say in case of Python and standard name is main that by now inside this file, you will write your code. In this case, it will be very simple, like print Hello World. Now imagine you have something which is called the version. You have version of a gold which is ready to be deployed to your customers, right? To be provided to your customers. And now because you are using it, you decided to bake up your solution with the GUID. So you will say to get like, This is my working directory which is called good tutorial in this case, please take all the contents of this directory and version it or backup it to somewhere where you are storing the backups, right? So what we will do, it will look inside the files and it will look for changes in the files. And because you are doing the first versioning or first version of your code, there are no changes. So good, we'll take the whole repository packet in something which is called a commit, and then it will store it in a special location within your computer, which is called a local repository. Local repository is a place within the Git software where the code is being stored, right? It's somewhere in your, you know, disk space in your computer and get is storing their changes, changes the lines which you changed, we think comets for future. All right, So anytime when you want, go back to this version, you can ask, good, good. Please provide me the last version which you committed AND gate will give you this version from the local repository to your working directory. Now this was very simple, but imagine your customer is like needy and he or she decided to add some functionality to your goal, right? And he's asking you like please, Michael, can you write on the next line after her world your name like Macau, who'd score every time you are triggering this program. And you say like sure, that's not a problem. You will open your working directory and you will change the You will add there another, another line. So you are creating a change. These change is different for a previous version because in previous version, when you look at these two files, you see that the change is one extra line. Now, you can create multiple changes. For example, you could create like 10, 12 extra lines, right? So now your new version has some changes against the previous version. So what will you do now? You will say to get now I have another version, good, please back it up somewhere. What will get you to do it? We'll look on your changes in your current working directory and it will compare them with the previous version. And then it will backup your whole new solution or whole new version to a local repository as a version, let's say number two. So now we know what is the working directory and that's your folder where you are developing and what is the local repository. That's the place where the changes are packed inside the comments and stored right now, git has also a third, let's say we can call it an environment, which is our origin abstract term, which is called remote repository. Remote repository is store four versions outside of your computer. Now remote repository can be on a server, can be on a computer of your friend, of your colleague, right? Can be anywhere. Now, the idea of these remote repository is that you are not only storing the changes within your computer. But you are also putting the changes somewhere else. The reason for this is simple. Imagine you will break your computer. If you would have only the changes in your computer, you will lose all your changes it with these remote repositories, you can store the same copies of version somewhere else. And this is the distributed approach which I was mentioning couple of lectures ago, right? So having this remote repositories, we can store copies of our versions. Now, remote repositories are mostly connected with applications like GitHub or GitLab, Bitbucket or any other stuff. I will talk about GitHub within this course in future lectures. So you don't need to worry if you don't know what is the good lab GitHub stuff, right? But you need to understand that these remote repositories are not only connected with GitHub and staff. Remote repository can be anything else, can be a server, can be another computer where the good is supported or provide it, right? In this, with this architecture, then we can have multiple copies of the repositories or of your whole project in the computer of yourself, in the computer of your colleague, of your friends, of your parents and stuff like this. So this is the main idea of good. Now before we move on, I would like to talk about the fourth part of this whole system. This fourth part is essential, very essential. It's called a staging area. And I was thinking like, well, I'm going to talk about the staging area for us theoretically. Or first I will show some practical part and I decided to first talk about it theoretically. Now staging part is the most abstract part of these four and it's quite hard to understand. So if you'll have troubles after this lecture, don't worry, go for another lecture and VDS practical examples, I bet you will understand it much better. So what is the staging area? I would like to explain the steady Gary Ana example. Imagine you are working in a team where you are developing an application which consists of two files, right? So you have your folder, let's say Git tutorial. And in this folder you have two files. One file is called a, and the second file is the mathematics that pie. And now you have your first version stored in your local repository. And also does your friend John, who is working on the same project, the zoo. Now imagine you are working on this project very hard and you have done a lot of changes in the mathematics that by and also in the and John was working simultaneously on the same project, but he was only adjusting the main that by now you decided that you want to push the changes in the mathematics that pi, so John can work with these changes in his working directory. So what you will do now, as I mentioned previously, you will tell your good to, to create a comment from your changes, right? But if you will do a commit in this time, the changes or the new version will also have the changes inside the main that pie which you created. And you don't want to put these changes into another version because you want just to send the changes in the mathematics department. So how will you do that? And that's where the staging area come, comes into play. Staging area is something between your working directory and your local repository. You can say to staging area like, please take this changes from my logo, from my working directory, let's say changes in May that by, and I put them into a staging around us. You are telling this to get good. We'll take them and put them into staging area. And when you are ready, you can say, Okay, I'm Dan police get created the commit from the staging area and create a new version of this. In this way, you can store or keep the changes from in your working directory and you don't need to put it into another version. And you can later push it in different versions. Now, this is very helpful and is very useful because many times when you will be writing code, you will create a lot of changes and you will forget to create these versions for your friends or for your colleagues, right? So staging area comes into play when you want to split the changes in your working directory to different commits. This could be quite complicated, right? Maybe you are still now having doubts if you understand the staging area or not. Don't worry. In the next lectures, you will see practical examples on how to use the staging area to full potential and how to correctly create commits. And we will talk in more details about these parts of the process, which I was mentioning in this theoretical part. I hope you are doing this tutorial. I hope I will see you in the next lecture. Thank you very much. 6. Git init, git add: Hello, my name is Mikhail hoods. Go and welcome to another lecture of our good tutorial. In this lecture, I'm going to show you how to create your first commit, how to version your code within your get inside the Visual Studio code. So let's go directly into the Visual Studio code in order to work with me during this lecture is important that you have created your folder where we're going to work with good, okay, as I showed you in previous video, you just need to create a folder within your file system. For example, I have it in documents, tutorials slash good tutorial n. And then you need to open it in your Visual Studio Code hit File, Open Folder. Now it's important than you will open your terminal inside your Visual Studio code because we will use it very often. You click on the new terminal and this will open for you and new terminal here, it's important that these path over here, this is called PAP, is pointing out to the same folder as you are directly within your resource to the ACOTE. So documents, tutorial, good, tutorial n, if it's not, please make sure you open it with the Open Folder correctly as I showed in the previous video. Now, before we move on and create the first Git repository, where are we going to store our code and version out? Our code is important that you will configure your good software inside your computer correctly. Now, it doesn't know who you are, and it's important that every word you will create with Indeed, for example, some comments or some changes in the future. You will link it with your identity, for example, your username and email. In order to do that, you need to explicitly tell good who you are. You are doing good with this command with Git config. And you are saying, please for global for all my future Git repositories set my username, user name to, in this case, mythical, who's got, okay, So in this way, get will link your name with all your future work. So you'd need to do that. You press Enter in this case, I already did it, but yeah, we can do it this way. It is important to link it with your mail. So git config global and then you go like user that the e-mail and here you will put your mail. So in my case is Mika L underscore hoops go at the company where where I work. Currently, you press Enter and this will link your email there. Now, if you are not sure whether you specified it in the future or not, you can always look to your conflict with the command git, config dash, dash list. This will show the whole configuration set up for your, for your current gate. And as you can see, I have my username set Tamika holds go and email set to my working male. Why you need to link your mail with your commits and video working with, because in the future you will share your code, your changes with the rest of your team. And you want them to be able to contact you when they found something suspicious or strange. Okay, now we have this clear and we set up the configuration for our network. Now what we need to do is a set is to set up a Git repository. The previous command, which I'll show you with a good conflict you could run from anywhere, not just from these docu, not just from this folder, but the next command which I'm going to show you, you need to run weaken the folder where you want to initiate your repository. The repository is a concept of get, where we are writing like a code and VR doing changes and we are doing commits AND gate is able to work with in this repository, a repository is always a folder, and then repository contains all the files and subfolders of this folder. So you just need to specify the repository only within the root node or the root folder. So this will be our root folder, good tutorial em. And I'm going to initiate this repository with the command git in it. Now before I run it, let's look inside my File Explorer in Windows, and as you can see, it's empty. When I run this command git in it, I'm English, I initialize an empty git repository inside the location here. And now as you can see in my Visual Studio Code, I don't see any changes. But if I go here inside the file explorer, I see there is something which is called an hidden item and hit the night, then we the name that, good. If you don't see it, It's important that you will go here to the View tab and you click or check the hidden items. The dad get folder is configuration folder for the Git repository within current folder. And if you open it, it has a lot of sub folders and files, which I'm not going to talk about right now in the future. And there will be a lecture for advanced use cases, optional lecture where I will describe what are these files used for and what are these folders used for currently, you don't need to know about it. The only important thing is that whenever you will see somewhere at that good folder, it means this folder is a Git repository and you can work with it as a Git repository. I will show you later in this lecture. Now, what changed if you look inside your command prompt, suddenly something strange is appended. At the end. It's called the branch name. Within these round brackets. And inside here you can see a master. What the master is a name for a default branch in good Master is a very common branch. And when you will be working in a big teams, mostly you will see this name for a branch in big projects. Now, you can name your branches as you want and what is exactly this branch? In the future videos, we will talk more in details about these branches. But basically you can think of a branch as a place where the commits or the versions are stored one after another idea we are creating some sort of a branch. We'll talk later more in details. Now that we have this branch ready and we have initiate, initiated our Git repository. We can firstly and finally write our code and then store it as Subversion. We will do the same example from the previous video. Just to inform you during my tutorials, I'm going to use Python if you want to have the highlights and autofill. So Visual Studio Code for Python. You need to install the Python extension. You can do it in the extension part. And when you put here like Python, the Python extension which I'm using what's called Python. You can install this one and enable it in your Visual Studio code, but you don't have to. You can write any code. This is just for example, purpose. Now how to create a file inside the Visual Studio Code. You can either right-click and put here file, and we're going to call it main that pie. And we press Enter. Now I'm going to do a shortcut wet. I'm going to write this code so you don't need to look at it. Okay, I'm back. As you can see, I created very simple Python code just to printing out the Hello World. We can go to execute it. But now we have the version which we want to put to our local repository. In the previous video I showed you there are three parts. Working directory, the directory inside your Visual Studio code currently or any other editor. It doesn't have to be a resource to the ACOTE, then the local repository where you want to store your versions. And there is something in between which is called the staging area. How do we interact with staging? And staging area is a place where we want to keep our changes before committing them into the repository, right? So to check out what's the current status of the staging and have used command git status. And this git status is telling us, well, there is, there are no No comments yet. Right. And you have some new untracked files which you may want to add to the staging area using git add command. How about that? Then the file which you want to add, maybe it's and there is nothing added to commit but untracked files presented. Well, so this is a very nice saying like gamma1 Mikkel, you didn't add anything to staging area. How do you want to put something to your local repository, right? So you need to first add things into staging and out, and you do it with the command git add. Now, we will talk more about this did add command later in this video. But it's important that after they get ad, you specify the file which you want to add, the staging area. In this case, it's a By running this command, we added this, this file to the staging area. So when we run the git status, you can see it's no more it, but it's green and saying change to be committed. So now I have stuck inside my staging. I am Sam changes, which I may want to commit in the future, and that's what the git status is telling me. Now, I have moved all the changes from my working directory currently to the staging area because I only had one file, but maybe in the future we will have multiples of them. So you, you can look for with that. Now, we need to create the comet, right? The version which we're going to store it inside the, inside the local repository. We can do the width in one command. And the command which we're going to use is git commit. Now, git commit, what it will do, it will grab all the changes from the staging area. It will pack them inside the commit, and it will add there your username and email so everyone can identify you. And one more thing, it will add a description. Now, you can specify the description within this git commit command with an M option. And in this EM, behind this, you are writing a string, which is the description. Now, the description of comics is very important in big teams because when you will have lot of these commits, you may get lost inside there. So having a very good, you know, a style of writing commits is important. Many of people who I know who are beginners with key then software developers, junior software developers, they have issues by writing this kid commits correctly. The best approach is to apply an imperative style of sentence. So you are ordering something to get like adder in it. Source, go for hello world. So this is very descriptive. Everyone who will be reading this comet will know like, oh, he's adding something, some, some initial source code for helloworld, right? When you press Enter, this message will be bound to the changes from staging area and a new commit will be created. And as you can see, Master, we are creating a root commit with this is a special unique identifier for that current commit. And the name of the description of the committees at, in its source code for Harold world, there is a one file changed and there are two insertions within this file because I've changed two lines of gulp. So by running these, I moved all the changes inside my local repository and I know it because first of all, the visual Studio Code is not showing any green files. So everything is fine and I can go sleep peacefully. Don't worry about losing my lab math. You don't worry about losing my code or writing. There's something strange. I have a working version stored inside my visual version control system. How you can look at what is inside your local repository. There are a few ways. One way, the graphical user interface way, which I want to show you it in the Visual Studio code, is using the good graph. When you click here at the grid graph, it will open a graph view saying on the master branch, currently there is one comment which is called as in its source code for helloworld outdoor me kahoot SCO. And it was published there 12 June 2021. So, so this is how you can look inside your local repository with a graphic user interface, you can also inspect your local repository from the command line, which I recommend more, right? But you can use the UI if you want. It's up to the command line command for this is git log. This gridlock will show, will tell you what are the comets within your current branch. We will talk about branches later, but this is how you can inspect it without a graphical user interface. So here is our commit which we just created at in its source code for Helloworld. Okay guys, I will, I will stop here so you can digest everything what you just learned. If you don't understand this, please go over this video again. In the next lecture, I will show you a more complicated staff with this git add and git commit. Where are we going to work with multiple files and with some folders, you can look for where the next lecture. Thank you very much for watching. 7. Git add, git commit: Hello MY Calhoun's go here and welcome to another lecture of RG tutorial. In this lecture, we're going to talk about some advanced approaches using git add and git commit. So let's go to Visual Studio Code. As you can see during the break between the lectures, I have created here couple of changes. So first changes that I created here a folder called utils. Within this folder I created the file which is called math.pi, which has some simple mathematic function in Python. Then in the, I have imported these function to utilise that map. And then I apply this function for two numbers just to see the out. You don't need to understand Python in this course, as I said in the last lectures, right? You just need to look at the changes in these are some normal changes during your development process. Let's start with the Visual Studio Code. As you can see, Visual Studio code is doing some strange things. First, look at the new lines left to each new line. Visual Studio creates this green column. So here, here is a new line, and here is a new line with some content. These green column indicates the lines which were added, right? So this file was modified. Modified means that there was a previous version which is stored or their insulin previous version which is stored inside the local repository. And now gate realized that there are some changes. So file which was already tracked and has some changes, is called a modified file. Then that's labeled with the M next to the name here. Then there is an untracked file. And you are quite familiar with untracked files from the previous lecture, as you have seen when we first created the main, main that pi, because there was no previous commit with these, you know, main that by it was labeled as untracked. The same applies for the math.pi because it was created for the very first time. Before we move on, there is maybe a question, okay, Mikkel, how can get C changes? We inside the sub directory, we created the dad get folder in the previous video in the root directory, right? So did you create it this dot get folder inside the utils? No good applies. These, you know, the whole structure also on the subdirectories within the system, right? So good. Sees every changes inside the sub-directories within the directory with that gate folder initialized. Okay, So when we look on our staging area with the git status, we see that the gate recognized one modified file with these and one untracked file, we think these utils, right? It's important that you see like the good is reporting like okay, there are some files within utils. Okay. And it's not very specific, right? This is normal. Now, what do we need to do? We want to create a new commit with all these changes and how do we create the communists? In the previous video, we have seen that before creating the commit, you need to first add some changes into the staging, staging area and how we do that with the good at. Now, in the previous video, you have seen the approach with the one file. So we put there like But this approach are these function app can have as many files as you want. So we can put here your appeals slash MAT that by all these files with the changes will be added to the staging area. I want to tell one thing and many times talking about changes, git is not like chaining the changes between commits know, within each commit, git is creating the whole folder. You know, it gets the whole folder and it like backseat up inside the commit. Okay, So this is important. I will talk more about these things in the future. The reason why I said here is like many times you will be hearing me talking about changes, but it's important to understand that is not changing, just the changes between files within commits. No good is copying all the files and all the folders, the whole folders working folder structure into the Git commit. We will talk later about this, going back to these get at. So this is one way how we can add files. Now when you press Enter, everything would be fine, but before moving on, you can add files one more different way. The way is by using the dot notation. This notation says, Please get at all the files within the current folder, okay. And which add all the changes within the current folder. It means like please get at also the changes within all the sub-folders within the current folder. This is important. So this is another way how we can add all the files when we put the command git add that. It will add the main that pi because there are some modifications and it will also traverse the whole tree structure. So it will go inside the fault subfolders and look for the files which are either contract or modified or deleted or renamed about deleted and rename files. We will talk in the later lecture, lecture. So this is one way how to do it. There is also another way. You can also say good like police at only all changes within that Py files. This is the wildcard approach, we are saying, please. Only files which end with the suffix that pipe. You can al here for example, Java or C or I don't know, CPP, whatever you want. Like. I just wanted to show you these wildcat approach. Right now we will use the dot approach. And when you run this command and when you run the git status, you will see what happened. So first, the columns, we saw Studio Code disappeared because these columns are showing just the changes which are not staged in the staging area. Okay. And now you can see that the git status says, okay, Mikkel, you have some changes to be committed. Like you modified the main that pie and you have also a new file utils that math.pi. Here I want to make a short pause and say, like, Git is working with files. It doesn't care about folders. If you have somewhere in empty folder, it doesn't care. It only cares about the files. We think the good right now there is no functionality to adjust the folders outside of the files within the folders, right? But maybe in the future it will be added there. But the whole philosophy of Keith is just to concentrate on the fault on the files. As you can see, the file is specified by the full well for relative path to the current folder. So the folder is within the name of the file, which makes the folder important in this approach. Okay, So having all these files added to the staging area, now it's the time to create the commit. You know that you can create the committee with the beat commit command, as I showed in the previous lecture, by adding also the message at the end. But what if you want multi-line message or whatever, you want to add something more in the message and there is no space between your command line. Now let's talk about this. You can run the committee without the M parameter. This way, something very strange will happen. So if I run git commit, suddenly the strange thing will appear. These thing appears inside the console, inside the Git Bash. It doesn't appear inside my Visual Studio Code. If you're running these examples from within your Mac computer, the same console will appear. This console is called a beam. Beam is an editor, and it's an command line editor. It's not the graphical user interface as Visual Studio Code, you cannot click there with your mouse. You can move within this room only with your arrows or ideally with your letters. But this is too complicated than this tutorial is not about whim. In this tutorial, we will just talk about Wim with the connection of writing comments. And in some cases, maybe I will show you how you can handle conflicts or other different staff with the VMM, Okay, the good itself allows you to configure a different editor for writing the commits. But I don't want to show you that for one reason, when you will go to a company or you will be working with a company, it's very likely that you will have to use kids somewhere on the server and on the server, there is no display. Like, well, you have your display, but it's very hard to use Visual Studio code within your server. In most cases, you will be forced to use BIM for your Git commits inside your server. That's the reason why I want to show you how you can at least write a comment within the VMM. Now, if you want to write something in the VMM or you will try to write something, you won't be able to do so for one reason, VMM has some access methods and one of these access methods doesn't allow you to write something. That's the default one, that's the visual one which we are right now interacting with in order to write something within the beam. So we want to write here the message on the first line. We need to access the insert method of whim. In order to do so, you need to click or press the key I, okay, I insert. So precedent ie. Suddenly in the button you will see this insert word, meaning you are currently like interacting with the insert bulb beating, you're good. Now, you can write the commit message. You can have multiple lines, but I highly recommend writing just a short one. This is an example. And in most cases when you will be working in a team, it's quite common to have one line commit messages. But if your company is doing something different, It's up to them, right? Do you have to? So what will be the commit message? We added some mathematic function on t. So don't forget about the imperative sentence. So at map, the map, the map them are mapped functionality. Okay, now, if we want to save this, how are we going to do this? Now, leaving or quitting dream is quite challenging. And if you were like on the social media, you have seen couple of these funny mimic pictures showing how hard this is for a programmer or a junior programmer to leave the VMM. I will show you how to leave the beam. In order to leave the VM, you need to first leave the insert method in the VMM or inset approach. In order to do that, you need to press the Escape button left top corner, press it. And now you left the insert approach or insert method, right? So now you need to quit in order to create the beam, we doubt changes. You can just put the column and q. But because we created some changes, you will have an error message like No rate since last change at the quake. The exclamation mark to overwrite, what does it mean? It's the same as with the paint. If you draw something in the paint and if you close the pain, the pain will ask you, do you want to save your progress safe? Don't Save. This is exactly what dream is telling us in a very strange way. So it's saying like you have some changes in the hell. Do you want to save them or do you want to discard them in order to discard changes in the VMM, you put the q and the exclamation mark at the end. That's the message was saying. But what do we want to save the message, right? We want to have this commit message within our commit. So how are we gonna do that? You're going to press here WQ. So the w needs to be before the queue and it means like write and quit and pressing Enter. We will create the commit message Achmat functionality to our local repository. As you can see, all the colors from the left pain disappeared. And when we click on the beat graph, in this case, we will see that there is one more new commit showing us that, that the master there is an ultimate functionality. And before there was at, in your source called helloworld from the previous lecture. If we go to the good luck, we will see here one more comment. So the newest commits are always on the top of the gridlock and the oldest at the bottom. So everything is fine. Everything is amazing. Now, one more thing, one more special feature of Visual Studio Code. If you go right now to the main that by, you can see one special, very special feature. If you click on this line, Visual Studio code will tell you who when created this change within which commit. So it's saying you created this change five minutes ago and the name of the commit, it's called at MAD functionality. This is very handy. So if you look at the helloworld, it says you created this change six hours ago. So I was recording these lectures six hours ago. And you created between the commit at, in its source code for helloworld. This is helpful if you'll be working with the victim and the multiple of developers will be adjusting the same file. You can see who created which changes on which line. And this can help you to, you know, to blame someone else when somebody creates something wrong, right? Okay, This was helpful. Fine. That's everything for this lecture, we will talk more about the staff in the future lectures. Thank you very much for watching. I hope I will see you in the next lecture. 8. Git rm: Hello, my name is Miguel Hidalgo and welcome to another lecture of our Git Tutorial. In this lecture, we're gonna talk about how to remove files with Indeed, or how to remove tracked files within it. So let's start by looking into our resource to the ACOTE. If you were watching all my previous lectures, you see that there is a change. I added here a file which is called nodes that dxdy, in these notes that the XD file I have here written some notes. And now in this video I'm going to show you how to first at the file into the local repository. It's the same way as in the previous lectures. We are just repeating our stuff. And then I'm going to show you how to delete these filing the next comment. So let's start by adding our changes because as you can see, this file is untracked. And if you see, if you look inside our good graph, nothing changed from previous version and there is just some uncommitted change here. So what do we do first is we look inside our staging area and we see that there is one difference against the local repository, which is telling us this line. Notice that the sixties and tracked. So we add these file or we add everything by using good at that. So this will add the changes into our staging area. Yes, I'm talking about about changes, but you need to keep in mind that Git is actually taking the whole file and it's putting it into the staging area and late later it, it creates a hole like a copy of this file and puts it inside the local repository and it keeps it inside the storage. I will talk more about these later in our, in my lectures when I'm going to talk about some advanced stuff we can get. Okay, now we added the changes just to the staging area. Don't forget to create the commit message, sorry, commited with the commit message. So git commit m, Don't forget about the imperative add notes. So now we added some file and as we can see here, the good graph has changed. We have now 33 comments there with the top one or the latest one, which is called add notes. If you look at the good luck, we see the same situation here. Now imagine you are working on a project in Sandy. Suddenly you decide like, okay, I don't want to track these nodes that the X t, one way to get rid of the nodes that the extreme these cases just moving one commit behind and restore from that change. But this is sometimes impossible because you are not sure which Comey did you add these nodes and you don't want to, you know, skip all the commits in between. So how are you going to do it? One of the ways how you can do it is just simple. Delete this file by pressing valid move to recycle bin, you can apply the same steps in your Mac, like then there is a Backspace command, right than the command backspace and this will delete the file. And now if you look at your staging area, our git status in this case, you will see that the good has recognize a change which is called a delete. Okay, So delete this also a change. So not just the modification and untracked files, but also deleted files are taking care like change. Now, what do we need to do in order to add these change into our local repository is to round VT at and notes that dx, dy. In this case, we added the changes into the staging area. And what we can do next is just simply commit our work into the local repository. And since now on there won't be any nodes that the XT within our repository locally. And when we give someone the access to the coding our local repository by sharing it through the remote repository, which I will talk about in later lectures. No one will see the nodes that dx, dy there. I want to show you one more thing. Look, I'm not committing it because i'm I want to show the other way how you can deal IT staff within good. Okay. But before we move there, let's imagine you suddenly realize that you didn't want to delete these notes, that the how do you undo these uncommitted changes written your staging area? This is sometimes challenging and now I'm going to show you some set of commands which are a little bit advanced. And I will talk more about these commands in the later lecture. So if you don't understand them right now, don't worry, we will talk about it later. So the first command which we need to do is first we need to undo these at, yes, these at command, which I ran here. To undo the at command. Git has a command which is called rests it. And now we want to tell the gate like, what do we want to undo? And one good practice is saying like police arrested to the actual position or arrested to the actual commit inside our local repository. Next question is, what is the last commiting our local repository is this blue one? That's this add notes, right? And you're done. You can specify few ways and one of the ways is just saying like reset the current staging area yes, to the changes inside the local repository at the head, at the top of the local repository. So to the latest commit. So by running this command, as you can see, and if I run again git status that change the git add change or the change added to the staging area was forgotten, right? So we undo the good app in this case. And this is quite helpful because right now we can reload the directory or the working directory from the local repository. So what I will do now, I will just get the status or the situation of the directory from add notes and I will reload it inside my good tutorial, inside my working directory. By running the command git checkout that. And as you can see, suddenly the notes appeared here. Why? Because the nodes and were presented in the last commit of my local repository. Now git checkout that and get dressed seed head are a little bit advanced comments and we will talk more about these commands later. I just wanted to undo this change. So I can show you one more command how we can remove files and folders within good just by using good executable. Okay. So don't worry if you didn't understand what I just did. So the second way, how we can get rid of these nodes that the extreme, because I have it now right back here. And currently there are no changes so far and git status, right? Everything is exactly the same as the local repository because that was the last comment which I committed, right? So how to get rid of the files which are tracked. And this is important. You can use git to delete files which are tracked by running command get RM. And behind here, you will specify the name of the files or folders which you want to get rid of. So in this case we want to get rid of nodes that, but you can add here as many files as you want. You can even add here wildcards, which I showed in the previous video. Like for example, you want to get rid of all the Python files, okay? Get rid of all the Python files. How simple is this? Get our M is special. It will not just get rid of the nodes that TXT. It will also add directly the changes into the staging area. So integral around the at command behind the scenes. So we don't need two. This can be sometimes helpful, but you need to keep in mind what is happening behind the scenes. So let me show you. So get RM nodes that the, and when I press Enter, suddenly the file disappeared and there is one uncommitted change. So if you log into Git status, you will see that this is green. So the deletion just happened and also the command git add happened behind the scenes. So everything is perfect. Now the only thing which you need to do is running the git commit. So git commit, message delete. Don't forget about the imperative. Delete nodes enter. And now if we look inside our graph, there is the fourth commit. We did deleted notes. Now, so I showed you how you can delete files, but what if you want to delete the folders? Folders you can delete again the same way as I showed in the first place by running the lead and then add, you know, the changes and stuff. But you can also delete folders with the RM command. R. M stands for remove. Okay, It's a shorthand. So how you can do it by running it are em dash and the name of the folder by running this command like there will be a folder name, for example, utils, but I don't want to get rid of them because I want to use them in the future lectures again. Try it on your own. Create here a separate folder. It's a good homework, right? Then put there some files because you need files in order to track changes. And I, as I said, you can only RM files or folders which represented in your local repository. Otherwise it's not possible. Ok, and then run the get name of the folder and you will see how you can get rid of the folders. Okay, So this was the way how you can get rid of the files. Maybe the first approach is better for you. Maybe the second one is good for you. You just need to keep in mind the options which you have. Because sometimes your colleagues may be using some different options so you are not surprised. Hopefully you like this tutorial and I wish I see you in the next lecture. Thank you very much. Have a nice day. 9. Git mv: Hello, my name is Michelle Woods. Go and welcome to another lecture of our good tutorial or get course. In this lecture, we're going to talk about how to rename files, getting it, and how to use good executable for this. Okay, the selector is very similar to the previous lecture where we are talking about removing files. So first, as you can see in my folder, I didn't change anything between the lectures. Everything is exactly the same as it is at the end of the previous lecture. So now imagine your client or your boss or your manager decides to rename one of your packages. Let's say these math.pi inside the folder utils. In this lecture, you will see that I will interact with file inside the folder. So you have experienced this, Let's say the manager wants to, or some of your colleagues wants to rename this package to mathematics? Yes, to the full, full world. How you do that? So there are a couple of ways how you can accomplish this with good. It's important to keep in mind that kit is working with these three stages. The working directory, the staging area, and the local repository. Now, the local repository or the state of local repository, the repository, the committee you can see in this graph. And now what we want to do is that we want to change the name of the file inside our working directory. And then we want to propagate this change to the graph like to the local repository, right? So for the future, we've uveal backup this version with the correct name for this package. So the first and simplest way which you will use, maybe most of the time, it's like you can click here and put here, rename and pull Here mathematics, right? And press Enter. Now, after pressing Enter, a couple of strange things happened. First, you can see that these file is suddenly labeled with you. Now, this can be strange. Why is it you? The math.pi was previously committed to a local repository. Why suddenly the same file with different name labeled as untracked. And the next strange thing is that in this good graph, you see that there are uncommitted changes to y two, I just changed one of the files. If you look at the good status, you will see that gate behind the scenes what the date was, that it deleted the utils that mat that by well, it looked like that for him. And then he recognized the new file utils, mathematics that pi. So forget, this looks like a, like a two-step process, deleting one file and creating a new file. When we add all these changes, one of you may say, okay, we'll go with that, right? But I will not do it this way. So you see the importance of understanding what is happening behind the scenes. So by running it at, you are not adding just a change in one file. You are actually doing these two changes. So when you do want to do it one by one, you need to say like police at changes with the new tills that math.pi, although these file doesn't exist anymore. And also please add the changes within utils that mathematics, mathematics that fine. Now when you add this and when you go to the Git status, suddenly good realized, well Mikhail, you're just reading in the file. So this is important. Forget, renaming a file is like a two-step operation. And after adding the changes to the staging environment or the staging area sodium, I'm always calling it staging environment. I'm crazy. So after adding it to the staging area, idealized, well Mikhail, you just rename the file and this is done for him. Now you can come into changes and everything will be fine. But because this is a very similar lecture, would the previous lecture, I want to show you a different command, how you can do that. Now in order to do that, let's again move backwards in time. And right now we have some changes in the staging area and imaging. You want to get rid of all the changes. You want to move back to the last commit where this was called math.pi, and you want to forget all the changes. Now this can be helpful many times you have lot of changes inside your staging. I do decided like to go from start from scratch and forget about everything you are doing for the past two weeks, right? So how you can accomplish this, you can run the previous commands which I showed in the previous lecture like the git reset head and git checkout that, right? And I told you like we will talk more about these commands later today. I want to introduce another command which can help you to get rid of the changes, which is called kicked a reset again. So he dress n itself can have multiple parameters, right? And one of the parameters is called heart. Now, when I run this command, git reset hard, suddenly every change was deleted, not even staged. Everything is gone. You lost all your changes. So beware, when you are using git reset hard with this command, you can get rid of all the changes inside your staging area or inside your working directory which were not committed to the local repository. Git reset hard is a very powerful command and we will talk more about these later in the lectures. So by running address and had I moved back to the previous commit, to the situation from the previous commit. Now what I can do is that I can rename the math again. And this time I'm going to use the good approach, the command line approach, the correct approach, right? So how to do it is by running git MV move, right? And if we are moving the content of utils, so source is the first parameter. So source is UTS and we are moving it into utils. Map. The map takes that by thematics that by, by running this gate will also rename these mathematics that by and behind the scenes, it will also add the changes directly to the staging area. So we don't need to run the Gita. You know, the git add, git MV can be very powerful tool is good to use it instead of clicking inside your GUI, right? So, you know, I prefer this way, but it's up to you. You can use any of these ways. Okay, So that's everything for this lecture. I hope you learned something new. I wish I see you in the next one. 10. Git branch: Hello me Helmholtz, go here and welcome to another lecture of our good tutorial. In this lecture we're going to talk about good branches. So I was little bit talking about git branches at the beginning when I said that every time we create a snapshot of our working directory or recreate the commit commitment snapshot is a synonym. We are like creating the commit into a branch, right, in our local repository. Now, the default name of this branch or the default branch name is called master, right? Why Master? I don't know, like the outdoors decided to put their name master. Now, most of the projects which you will be working in and using it, they will have the name of the branch master because people are lazy, renamed default branch, where you can have multiple branches within your group project. And this is what we're going to talk about today. Why would you need multiple branches? Now before we move to this question, let's discuss what is a branch. Branch is something which is called a pointer. Like this branch staff is an imaginary thing with Indeed, which is like pointing to a certain comment. Now, every time branch is pointing out to the latest commit, which you did within that range. Okay, this could be confusing, but you've understanding later. Now, whenever you create the comment, what do you did is you look at your working directory and then are your staging area, you create the snapshot of the staging arrest. So all the files within your working directory, then you bake. These changes are not just changes every file into a thing which is called commit. And then you put this commit into your local repository. And this committee will be pointing out to the, to the, to the previous commit. It's like a linked list inside. Okay? Then every time you do this, good will automatically move the pointer of the branch to the latest commit. So as you can see, branches are something like a starting point for us in, uh, in our revision history, which is pointing to the latest revision within our source code, right? So why would we need multiple branches? If we have multiple branches, which is very useful and very common in the software projects, we can track different changes. Yes. So we can have one branch which will be linking, commits one after another, one after another with changes regarding island know some, some mathematical part or mathematical aspect of our program. And we can keep only in our master branch some working code which is ready for customers. Now, later in this tutorial, I'm going to show you how you can then merge these branches altogether. But this part is just about branches. If you still don't understand the concept of branches, just wait. At the end of this lecture, I'm sure you will understand it. So let's go to our Visual Studio code. So I'm in my Visual Studio Code and as you can see, everything is the same as last time where we just renamed some file. Now, if we want to look at the current status of our branches are, or how many branches do we have in our local Git? We use the command git branch. And this will output all the branches which we have. And it will label with the start the current branch. Right now we have just one branch, the default master branch. And this is labeled with star because that's the default branch. It, you can also see the default branch here in the round brackets next to your command prompt. I think if you are working in your macOS, you don't see these parts, so you need to look at the branch. Now, when you, when we are using good graph, if you click on a good graph, you see the status of a current master branch. So master branch is just a pointer and it's pointing to the latest commit over here. And then all these comments are linked by each other, one after another. You know, the oldest one is at the end of this branch linked list or how are we going to call it right? Now before we move on, we need to talk about concept of something which is called head with capital letters. So if you look at the good log, you will see the current status of your branch, right? So good luck without any parameters is showing the status of the master branch. If you are in the master branch, now this output can be sometimes long, so there is a very useful parameter of it. So if you go like git, log, one line, so dash, dash one line, this will just show you, you know, the name, the commit message, the unique identifier for that particular commit, one after another. At the, at the top you will see the current position of the master branch pointer, right? It's pointing to the latest commit. And then you, you can see that there is something which is called head and hate is a concept in good, which is another pointer. So this pointer is pointing to one of the branches and is just telling good, Where are you going to put your next commit? This head will help us when we will have multiple branches within our project. Okay, so now let's discuss about how we create another branch. Indeed, creating a new branch is as simple as running git branch, and then you specify the name of the branch. Let's say we want to track some changes in this branch about connecting to some database. So we will name it database access that beings access. Now when you press enter, what will get do git will behind the scenes create another pointer and other branch pointer. And this pointer will be pointing to the same commit as your current branch. You can see it here. So the database access pointer is pointing to the same commit as the master branch pointer. And because currently we are working with the master branch, our head is pointing to the same comment. When you run the git log right now, you will see that our head is pointing to the master because we are working with master and our next commit to master. And we have also a database access pointer or a database access branch, which is pointing to the same commit as the master, which is the commit seven, d3, 12, FC. Now, so this is how we create branches. When you look at the git branch right now, you will see that there are two branches. Now, what if we want to do changes within this branch? You need to understand that creating the branch is not like, you know, already connecting to the branch. We need to somehow move these head to be pointing to the database access. And we can accomplish this with the command git checkout and the name of the branch where we went to point. So database access by running these, what will happen? These two will turn, will switch. So always the first branch within this good graph are the branch name is telling you where your head is pointing. So currently is the database access part and currently it's the same committee as the master part. Okay. And as you can see, our command prompt has also a database access here. If you are on Mac and you want to know which branch are you currently pointing urine git branch. And then you see that the database axis is now labeled with the star. So you are now working with this branch. Now, let's say you do some here, some changes. I will do a shortcut. So I have created here a file which is called database handler. It has a function which is called Connect and it just printing connected, right? There can be some, some more strange functionality, but for the purpose of simplicity, I just put here a couple of lines. So now as you can see, if you run git status, you will see that there are some changes. And these changes are now compared from your working directory against the branch where the head is pointing. So currently it's the database access branch. Now, you need to add these changes and create a commit in order to, you know, at the new commits to this branch. Let's do it step-by-step. Good at. You can do it like this, or you can do like that, or star, whatever we do add. And now you specify the commit message, like at that base handler example. Now you press Enter, what happened. This shifted. So currently the database access pointer is pointing to a commit at the database handler, right? If you click on it, you can see who did the blurb about the details about it. That's not important right now. But the master branch or the pointer for the master didn't change the location. It's still pointing to the old commit. So now what you can do is what if you switch back to master? So look here at the left, we have the database handler, right? So when you go like git checkout, checkout is for switching the branches. Now when you go back to Master, suddenly the database handler disappeared. Right now we are pointing to the master and the change is not there. Why? Because now what we did is that the commit is being chained, you know, in the database axis range. So under the database access pointer not to the master pointer. So what now, what if we want to do some changes in the mastering the different bridge? Imagine you will create here a new file like image handler, right? So for handling images, right? And it will just do their handle, handle and it will just print. Hi, right? What did you do here changes and you add them again like that. And good communist message at image handler, right? Well, they'll happen now. So if you look at the good graph, can play, the good graph will recognize that you are doing changes in different branch. And these changes are not being associated with the database access branch. So you create it. Here you can see the visual branching part, right? So the, the blue one is the, are the comments. I'm linked in the master branch, so linked under the master reference or master pointer, right? And here you can see that's the image handler. And this committee was created from rename that handler. And it's changed across all these commits. And the situation for database handler is different, right? Because we created the committee with the database handler under the database handle apart, right? So when you look at left, there is the image handler and when you check out back to the database right, access, you see that database handler is currently, and this is the most important part of the whole gate, creating the branches and changing the changes or changing the commits within branch, right? This gives us a great power. For example, if you are working in a victim, right, everyone can create a separate branch and change the code within these branch. The end not affecting, let's say the master branch. Where are you going to chain all the production code ready for customers without any bugs which is tested and prepared for production. Now one important thing you need to keep in mind, master branch is not any special branch. It's the same branch as any other branch. The reason why it's used so often is because it's a default name for the branch. But for example, when you will be working with some GitHub projects or modern GitHub projects. They won't have the master branch anymore because they decided to rename it to main, right? So don't be scared and don't always look for the master branches within projects. There can be any other branch, which is the main branch. And it's all about, you know, the rules within the team which you agreed on. Okay, so this part was very important. We learn something new about branches and how to create them, how to change the branches and how to chain comments within the branch. I hope you learn something new and I hope I will see you in the next lecture. Thank you very much. 11. Git merge: Hello, my name is Mikhail hood SCO and welcome to another lecture of RG tutorial. In this lecture, we are going to talk about merging two branches. In the previous lecture, I showed you how to create branches in good and that the branches are useful. For example, if you are working in a team and multiple people are working on the same project. So everyone can create a separate branch and work on its own. Imagine a situation where you want to have in the master all the changes from all the other branches. So at some point in time, you need to get the changes one of your branches into the master branch, how you're gonna do it. That's the topic of this video. The tool which we are going to use is git merge tool. Good marriage is a function we think it, which helps you to combine two branches, one into another. Before we go to the Visual Studio Code, let's recap our current situation. So in the previous lecture, we had a commit in a time from which we created another branch which was called database access, I guess. Yeah, it was the database Axis branch. So to the AAP Committee that the master branch was pointing out and to the new commit. And we then created a new committing, this database access branch where we added database handler. And database access is currently pointing to this commit. Now, if the situation would be like this, the process of merging would be very simple. Imagine you want to get the changes from the database access branch into your master branch. The only thing we do need to do is just get the pointer of the master and point it to the same branch or to the same commit in this case story as the database access. And now you seeing both of the branches, but our current situation is little bit different. What they did in the previous video is that we created another commit, this time from master branch when we created an image handler. So in this case, we have two different branches. So the source code in the master branch is different than in the database access. In this case we have one extra database handler, and in this case we have an image handler. So in order to do this, we need to run good marriage, the marriage process. In this case, we'll use three kinds of commits, okay? It's called a three-way commit. So the first comment which the message is going to use is the commit of the one of the branches so that the base access, the second Committee which we are going to use is the commit in the master branch. The last commit in the master branch in this case, or the commit what the master branch pointer is pointing out. Then, good, we'll use a common commit in the history. So the commit from which both of these branches were created. Now you need to understand there can be a lot of different commits chain, chained, right? So, so the good marriage needs to go maybe furthering the history to find these common commit. Now what good will do? It will compare the current situation with the Origins situation and the current situation in master we do Origins situation and get the changes between these two branches and merge them together using git merge commit or a merge commit in this case. Then in this case here, we will just simply move the database handler into the master branch by adding it here into this commit. And then what we will do, we will just move the head of the master pointing out to the git merge commit. So this is just some overview in the paint. And now let's go to the real deal into the Visual Studio code. So this is our current situation. As you can see, there is one commit here and one commit here. So first, we want to run the good match. How do we run it? In order to merge database access branch into a master, we need to go first to the master branch. So we need to check out master branch. Serena, we are in our master branch and now we need to tell gate like please get take the database access branched and military to our current branch. Okay, so always be sure from where you are running the git merge command. The destination branch is the branch from which you are going to run the git merge command. In this case, the destination branch is master. So we will run git merge Marriage and the name of the branch which we want to merge into master. So in this case is database access. When I press Enter, what will happen, as you can see shortly, this graph will reload the database access was merged into a master, creating the merge commit, which I was showing in the paint. So this is commit with a commit message. This message is created after out of the box, but you can override it if you want. But default behavior is like the gate creates a message with the name merge branch database access into master. Now if you look left, the current working directory is reflecting the situation of mass than a y because the head is pointing to the master. The current situation in our utils is that we have the image handler from the previous original master with a database handler from the database access. So these kids merge is very simple. It connected to branches into each other. Now in this case, database access into a merge. One important thing. Now you don't need anymore the database access branch. So what you can do, you can delete the branch. If you want to delete the branch, there is a command git branch, dash d, and you put the name behind there, but you don't need to always delete the branch after merging. These branch exists still in your Git so you can check out to these branch. So good trick out that the base axis, right, database, database access. When you check out there, the situation in this branch is still the same. The branch still exist. You didn't delete it. So what you can do, you can create another committing this branch, and this time the branch will track again commits in, just in these, in these branch. Even though you merge it before to a master, right? The database access will still exist and this is very powerful and is used many times. So now for example, if you create here a new file like Postgres handler, I'm just making up some names, right? It doesn't matter what you put here. And you put your like bringing high, right? And when you create the comment of it, so good at that. And get, sorry, my computer is a little bit slow and get the commit message. I didn't know at the Postgres, right? So what is happening right now? If you look inside your good graph, you will see that now. Yeah, the colors changed. So beware, the colors changed. This time database access is blue and master is pink, right? So the branch, although it was before merged into master in this case into pink, It's still exist. Yeah, as you can see, this is a crossroad then another communist created here. Now everything is fine. Now you can again developing this branch and maybe later you can merge it back again to master how you're gonna do it. Let's do it again together. So git checkout to master, we want to merge some branch into master. And we ran good, match. Database axis, right? Database access, Enter. And in the utils the Postgres handler appeared shortly. The good graph we'll refresh. Yeah, as you can see, you can see that from the history once it was merged into master and second time it was merged into master. Now, how cool is that, right? So I'm always showing you this good graph. This is just useful to, you can always see what is happening from your console. There is a command. Good luck, but you need to be careful here. So good luck. Always showing these details. You can use one line, one line, one line to show just the commit messages. And as you can see, like the, those are the comments for the master branch currently, right? It's telling you that last time you merge here, the database access into master, it has also the ad Postgres commit from the database access branch before there was another branch, right? So, so you have here the whole history and if you are interested in all the branches, you can put here, all right? And moreover, you can put here this graph if you want, but this crab will be a little bit more like a little bit tricky, right? So here you can see this left is the master branch. And then basically you can see the same graph, but good graph is much nicer. So I'm just showing you that you can see this graph even from your command line. For example, if you are working in a server and there you have no, no place to run the Visual Studio code, right? So you can view it from your command line. These tricky little graph, right? So, and you can see here, here was one marriage and before the changes were tracked inside this database access and the current pointer of database access is still pointing to discuss it, right? And the current point Rob Master is pointing to this commit and so on. So how cool is that? You like it? I hope you do. Thank you very much for watching. I hope I will see you in the next lecture where we're going to talk how to work with remote servers. And we're going to talk more about the collaboration using it. Thanks for watching. 12. Github: Hello Michele, who's coherent and welcome to another lecture of our good tutorial. In this lecture, we are going to talk about remote repositories. In the previous lectures, I was still working in my computer and that my intention here was to show you that you don't need any server in order to version your code using Git. You can do everything in your local computer. You can track the revisions, track the snapshot, create multiple branches, merge the branches and everything. Gate although uses the functionality of distributed system in order to back up your solution. So you don't want to keep all your branches and all your working directories inside your computer only. You want to back up your solution to some remote server. Now, when I talk about remote servers, I mean any computer where Git is running, basically the concept of good remote is that it's a same repository as you have in your local machine. And it works exactly the same as it works in your local machine. Okay, in this video, we're gonna talk about some special applications or tools which you can find, which can help you to set up a remote server. I'm going to show you how you can set up a remote repository using very popular application, Git Hub. There are also different applications out there from which I highly recommend Bitbucket or GitHub lab. It's up to you which one you're going to use. I prefer GitHub for my private projects. So before we start working with the remote repository, you need to set up a GitHub account. You go to the web page, and here is the homepage of the GitHub. So in order to create the repository within a GitHub, you need an account. So you click on the sync up and you registered there. I highly recommend registering using your Gmail. This is a very safe application. You don't need to worry about some spams and stuff like this. After creating the account, you're going to see again inside there, there was a shortcut because I have set up a two-factor authentication for my GitHub account. I highly recommend doing this for your accounts if you are working in some bigger projects and stuff like this. As you can see, this is your home screen in the GitHub, you have it may be in white colors. I have a direct team set up because I prefer the direct team. Maybe you don't have your anything right now you can see all my repositories, which I have here set up. I have here more than 20 repositories for different projects. Now I'm going to show you how you're going to set up a GitHub repository over here. But before we move to creating these repository, it's important to think about how does the communication between your local repository and your remote repository happens. Imagine you want to send someone some files, how you're going to do it. Maybe you create a zip and then you send it through your internet cable to the other side, right? But imagine someone else is listening for your requests through your cable. And this can be dangerous because he or she can get all your source code. Now imagine you are working on some secret project and this could be very dangerous to sending just the files like that. In order to solve this problem, you need to set up a secure communications. There are many ways how you can set up a secure communication between your local repository and your remote repository within good. In this video, I'm going to show you how you can set up an SSH communication between your local repository and your remote repository behind the scenes get we'll use a technique which is called public key encryption. In order to achieve this kind of secure communication, you need to generate a pair of private and public keys within your device, which is going to communicate with the GitHub, you need to generate this combination of public-private key for every computer you are going to use with your GitHub account. So in this video, I'm going to show you how you can generate these kinds of keys within your Windows system. You can use the same commands within your macOS system for generating the public and private keys. Okay, so before we move on, where are we going to store the public and private keys we eat in our device within our, let's say Windows machine. The same applies or so for macOS, we are going to store these kinds of keys inside our home directory. So in the windows, the home directory is in this PC OSC, let's say users and Mika hotspot, That's the my username for the computer. The same applies for my ego is when, you know, the path in the macOS is little bit different. So just go, just go to your home directory. And then we will create here a folder which will have name, which will have a name of that SSH. Sasa. Inside this folder, we will store our keys, the public and private key, which we need for secure communication between the GitHub and the computer. So let's go to our Resolve Studio Code and generate these kinds of public and private key. As you can see in my computer, I already have that, that SSH folder. And inside there, I have here these two files, id blablabla and IDE, the blah, blah, blah. First one is the private key, while the second one is my public key. Okay, we are going to generate very similar thing in your computer. Maybe the name will be little different, but the CPAP staff needs to be there in order to tell you that this is the public key which you want to use. To store in your GitHub. I'm going to show you how. So back to your Visual Studio Code and now we're going to generate, how do we generate these keys? We run the command SSH, vanish, Keegan space dash 0. After running this, we are going to be asked three questions. The first question is saying like enter a file in which to save the key and therefore the bat is to the location which I was just showing you as you can see, it will be goat ID essay, that will be the name of your public and private key. I'm using different encryption mechanism. That's the reason why my name is different. Okay? So you are going to store this file here and you want to use the default location. You press Enter if you want to change it and store it somewhere else. Put the location here, okay, after pressing Enter England around these because I have already the key set up in my computer. I don't want to destroy them. So after running this, you will be asked for a passphrase. Sometimes is worth to set up a passphrase for your SSH communication. Using a passphrase will mean every time you are going to push something to your remote repository, you will need to put their password. But that's something which is useful when you are working in some very secure environment. I highly recommend these for some production projects within your company. If you are just playing around, you can leave it empty by pressing Enter, then you will be asked again for the passphrase second time, you can press Enter again. Now after feeling these pass phrases and this file location, you will see a very small picture, as you can see in the, in the video right now, I just did this procedure in my computer of my wife and yeah, because I already have distinct set up in my computer and I didn't hit the picture. Now, after running this, when you go back to your home directory, to your users and let's say Mikhail, who's going my case, you will see that there is the SSH folder created. And when you go inside there you will have their RSA ID, Daesh, RSA and RDD HRSA pop. In my case, it's little bit different. Now, what do we need to do is we need to get the content of ID underscore our essay that pop, that's the public key. And we need to store these public key inside our GitHub. So we will tell Git Hub like this is our device. So how are we going to do it? We're going to run command cat. And then we're going to put there a full path to the, to the, to the public key. Okay, so we get the full pad by coping, let's say, you know, this whole path and we put there the name like in your case it will be ID, RSA, that pap. Okay. In my case, it's a little bit different. So you put there the ID, RSA dot CPAP or the name that pop you have in your computer and you press Enter after dead, you will see there are a bunch of letters and numbers and some symbols pop out in your screen. That's your public key. Please don't share this public key with anyone else. Copy this public key by labeling it, highlighting it, and pressing Control C. Now, what do you need to do? Just go back to your good lab. And in the good lab, click on your image, picture and the right top corner, and click on the settings. After clicking on the Settings, scroll down to the SSH and GPG keys part. And here you are going to see all your SSH keys setup. If you just created your account, it's empty. These keys stored there for each of your computer, right? So if you have multiple computers or servers, you can store the SSH key for each of them. You can run the same commands, the SSH key again, then the cat, even if you are using some Linux distributions or macOS on stat or stuff like this, the approach is exactly the same. In order to create a new SSH key, please click on the new SSH key button and the right top corner. Now Buddha, there are some very fancy title describing like, where is this SSH key coming? Let's say you're working computer or your phone computer or your MacBook or your, I don't know, serovar or something like this. And in the keypad police control V, the content of the DACPAC file which you just copied from your a command line. Okay? So now click on the add SSH key and you have set up the communication with your computer, write down everything which you will be sending from your computer to the GitHub will be encrypted so no one can read it. Okay, so this was easy. What's next? Next, what we need to do is set up a remote repository. In order to set up a remote repository, you need to create the repository within your GitHub. Before we move there, I want to mention that the same SSH setup and the same repository creation is applied in different applications like GET Lab or Bitbucket, right? You need to do the same things. The whole mechanism is very same behind the scenes, just the graphical user interfaces, little bit different. Okay, so we are going to create our repository by clicking New button here next to repositories. And you will see here a form for creating a repository. Please put there some descriptive name of your repository. In my case, if there'll be good tutorial, tutorial, dash n because I'm doing English version, I'm also doing a slag version in my mother tongue, so so that's the reason why I'm like separating. You'd like this in the description. You can write some optional text describing what is this about. So demo. For good tutorial in this case. And you can either choose whether it's a public repository or a private repository. Or public repository means everyone from outside can go there and read your code, right? And you can download the code and so on. This is, this is used mostly for an open-source solutions. You can also create a private repository which will be dedicated only for the people who you specify. But because I'm going to use this on my own and I don't want to share my tutorial code with less of the rest of the world, I would click on the private repository. You don't need to take any of these options because we are not talking about these options yet. Now, click the Create repository button and this will create your remote repository in GitHub. Next thing what we need to do is we need to transfer the code from our local machine into the remote repository. And basically here are the steps which is good directly to Hubble recommending you to run. First command, which we need to run is this one. Let's copy this command. You will have a different command, not the same as mean, okay, because your address for the repository we'll be here, right, in my case is MISO who slash good tutorial and that good because I, my, my username in the GitHub is me. Soho in your case, can be something a little different, right? So make sure you are copying this correct command from, from your screen. Okay, So copy this command and go back to your Visual Studio code. Now what do we need to do? We need to set up a link between our remote repository and a local repository. And we are doing it with this command saying like good at a remote and use a username for this remote. That's a nickname you can put here anything would you want X, Y, Z, whatever rate origin is a very useful and common name for the base or default, you know, remote repository. So that's the reason why there is an origin. I recommend you to use origin for your first or an only remote repository if you are going to use only one. Now and here you specify the full path to your repository, in this case in the GitHub, if you are using bitbucket, there will be a Bitbucket or I don't know something else. So here is your username and here is the name of the repository. Now, when you press Enter, good will behind the scenes registered this remote repository. And if you want to list all the repositories for your current project, you run the command git remote. This is no show you that you have one remote repository named Origen. If you want to know details about these nickname, you can put here v. And you will see also that this repository is linked to the special URL. Don't care right now about the phage and push part. It just says that you are getting data from this repository and you are pushing to this repository. As I said, you can have multiple repository setup and get them out is the command which is listing those. Now that we have set up these repository, we need to link our branches and push our branch into the remote repository right from our local repository to remote repository. Going back to the good, we can see that there is one additional comment before the push command. Push is for pushing, right? These commands is changing the name of our default branch. It's exchanging domain. The reason for this that the good, these decided to stop using the master name for a branch and instead using the main name. So if you want to, you know, push things into the GitHub, they recommend to you to rename your master branch into the main branch. So this is the command which you can run. So copy this and going here, Please be wear right now I have here Master. And when I run this, I just renamed it to maintain a fine and good branch. There is no more master. There is now main instead. Okay, So this is how we renamed the marriage for the GitHub. So the GitHub is happy with our naming conventions. And now what we do, we are copying the last, the third command. So these instructions are for creating a repository from already existing repository. There are some extra instructions for creating the repository from scratch, but you are already experienced enough that you have created the git init before and you have added some commits into a branch, So we don't need to do it this way. We are doing it the other way. So now we just need to push our changes into the remote repository by running this command. Now stop here and think about what is he written. We are saying like police gate, push the current Current Branch at two locations. Origin, which is remote, which we set up earlier and use the main because we set up the SSH key, these communication will be encrypted. And by running these, we will, you know, encrypt our data, our commits, and push them into the remote. That's what is written here. And now when we, when we go back here and press F5, we'll see that all the code is suddenly presented in the remote repository, right? You can see there are 10 commits, Whiting commits, because in our good graph, we already created that many commits since, since the start, right? So those are all the commits within our master branch. So if I click on the commits, I can see the history who created the comment when it was created, right? And if I want to see the changes within these comments, I just click on this part. And I see the code which was within these committees was our very first commit and stuff like this. So using these remote helps us to store our code somewhere else then just in our local machines, this is useful because many times we want to pick up our solution or share our code with the rest of our team. Okay, So this part was maybe a little bit more challenging. I showed couple of things. You are first into the SSH, maybe you were confused with the generating the SSH private public key. If you are interested more about how SSH work, this is not a tutorial about it, but you should read about the public key encryption or SSH keys within the gate. So you better understand what is happening behind the scenes, but it's not needed when you want to use at the gate for, let's say in a company project or stuff like this, It's not important, right? You just need to use it, right? So I'm not this kind of guy. I always prefer to read some more details about, about things which I'm using. So it's up to you guys. You can read it, you can read about it or not. I also showed you how you can set up a remote repository, as we called it an origin pointing out from your local repository into the GitHub project or GitHub repository which we created here. This is a very useful, those are the essential skills of a modern software developer. I hope you'll learn something new. Are you? Hi, I hope you will continue with this tutorial with next lecture, and I hope I will see you in the next lecture. Thank you very much for watching. 13. Git clone: Hello MY Calhoun's cohere and welcome to another lecture of our class. In this lecture, we are going to talk about how to work with getting a team to demonstrate the team cooperation with. Indeed, I will use two laptops, which we have here. One laptop, we will simulate the work of programmer number 1, that will be my Windows laptop, the same one which I used for the previous lectures, and the second laptop, my old MacBook, which I have here, we'll be simulating the work of a second developer. Okay, let's start with the MacBook. Okay, So imagine you are a new worker, right? You are joining a new team and they have already existing project deployed and published on GitHub. Now your manager told you like your first task is to clone the repository into your computer and work within these repository, your task is to create a new branch there which is called dry and put their Sam driving functions. Okay, How would you do that? So first of all, let's look inside my MacBook and here I am on the GitHub page for this project, which we created in the previous lectures. Now the first task is to get the project into your local computer, how you're gonna do that. So you are on a github comm Missa, who that's my username, good tutorial n. And here is the project. Now in order to get the, you know, the code inside your laptop, you need to have the SSH key set up the same way as I showed in the previous video for Windows, I was talking about the MacBook also, right? So you go to your terminal and you run, you know, the traditional command, the same commands which we showed in the previous video. So SSH key Jan, and then you press three times Enter, and then as you can see, I have my keys inside my SSH folder, right? So when I press ls, there is the ID RSA, that's the private key, an ID RSA that bump, which is a public key. You copy the public-key and you put it into your GitHub account the same way as I showed in the previous video. So when you have the setup, you are ready to clone the repository into your computer. I say clone because it's really cloning, right? So, so the way how are you going to do it is here at the right bottom there is always this code button. In here. You have three options, HTTPS, SSH and GitHub CLI. Now you go for the SSH buyer because that's the more secure one, and you copy this link over here, or you can press this button again, you go back to your terminal and now you need to make sure that you have the Git installed away, as I showed in the previous video, using the Homebrew and stuff like this. Yes, So I have it here. So if I press the good version, you will see I have to that 32 that, oh, okay. Now what I do is urine the command, the git clone. And then you paste here the link to the repository, but you copied from the repository couple of seconds ago, right? So when you press this command, git will clone the repository from the remote repository into your local computer. Now, I afford the purpose of this example I have created here and demo folder and I copy it. And I, and I clone the repository into this demo folder. So if I go to the Finder, you can see that here. I have here my demo folder. And when you run the git clone, a new folder will be created here called Git tutorial, and that's the name of the project from the GitHub. You can rename it if you want, but you don't have to. Now if you go inside, you will see that this is the main branch, the content of the main branch. So as a default, git clone will Coloumb everything from, from the remote repository into your local repository. And it will set up your working directory to the content of the main branch because that's the default behavior, right? If you don't change it, it will be the main branch. So as you can see, I have here my main that by utils and I have here also these get that Git folder and that's exactly the same, that folder from my Windows machine. So when I was creating this, you know, the repository, a previous lecture, the git push command will grab these data folder and it will put it into the remote repository. Now when you run git clone, you can clone everything from the remote repository into your local repository the way how I did. So now what we do, we will open the repository into Visual Studio code. So I go inside a good tutorial English and then I go like a coat that. Now this will open the Visual Studio Code. And as you can see, the content is from the main branch. If you open the gate graph, the best thing will come here. All the history, all the revisions, all the commits where cloned from these repository. So everyone who will join your team and use this repository, Heaven has now access to all the changes from the past. And he or she can anytime do a revision, can check the code. Kenny can, you know, go through lines which were adjusted by the colleagues, right? So if you go for example, to main that by, and you go for this line, you see that all these line was changed by Mikhail hoods go yes, two weeks ago. That's my colleague. Okay. If I have any problem with this, I can contact him and talk about these right. Now. The task was to create a new branch called drought. Draw. Just draw and put there some functions, routing functions. So how are you gonna do it? Do it firstly, open the terminal the same way as you did in the windows. Yeah, I don't mind these Postgres. Here. It's just a virtual environment for Python. It doesn't mean I'm on the Postgres branch here. Okay. So if you don't see it in your computer, you are okay. The way how you can check the branches in the terminal is like git branch, okay, So there is no fancy round brackets, stuff happening gets in the windows. So now you are in the main branch. Now you need to create a new branch and do some updates the same way as we did in the previous video. So, so the way how you do that is just git branch. And then you create the branch with the name. And then you check out to the branch, but you can do it in one step with git checkout dash B, git checkout dash B is the combination of Git branch and git checkout the same way as I showed you in the previous video of branches. So when you're angry Jacoby, and you put here name of the branch and you press Enter. Good behind the scenes will create for you the new branch, and it will also check out the branch. So you can do these two commands in one's okay if you want. So now the task was to create here a new file and name this file like I don't know, draw that by, right. And here we will put here just some print function which will mimic some routing function, right? But in reality you will code here a lot of lines and you'll tested and stuff like this. Okay, so now when you go for good status, you will see that you have here one change. If you double-check, the good graph is right now telling you that you are on the drawbridge. You have some uncommitted changes which you want to commit. So you're gonna do it with good at dash, dot, dot and git commit message. And let's put here at either no drought function. Okay. You press Enter. Sorry. Good. I misspelled. Get d2y GTI. Okay, so now I have my branch locally, okay? And I want to again push it into remote repository. So you will do it the same way as in previous videos. So git push. Now you will be prompted the same way as previously, like Omaha, wait a second. There is no drop branching remote repository. Do you want me to create remote draw a branch and you want to track this branch from your local branch. That's the way what is written here. And you go four, Good. Push, set, upstream origin Raul St, like, good, Yes, create in the upstream origin a branch Dao and, you know, set it like track and track it from your local branch drought. You press Enter. And now this will take a couple seconds. It will pack the changes. The whole working directory will be packed into the commit and it will be sending to the remote repository. And when you now go to the GitHub and you refresh it, okay, it was automatically refreshed. You will see that you have now two branches. And when you go to the branch and you go to the utils, you will see that there is a drought dot py. So this is the way how the newcomer to your team can work with you using this remote repository approach. And as you can see, this is very powerful. Thanks to the features of distributed system which get heads. You can leverage these to the full potential and it's very fast. You can track the changes and so on. Okay, and now going back to the Windows, okay, we will switch back to the windows. Right now, I will change my keyboards, so now I'm in the windows, okay? And when I run a git branch, you will see that there are just these two branches and didn't recognize any new branches, right? So, so what is the problem? How you're going to get now the new branch from the remote repository, right? Is there some common mikhail? Do I need to delete it and cloning again? No, you don't have to. Now what do you need to do is a little bit complicated. So in order to get the remote branches, new remote branches, you need to track your local repository with the remote repository. So you'll remember the good upstream sit up stream command. Okay, That's the one way saying like, please track the local branches with the remote branches. Now we need to do the other way, like police, my local repository, get all the branches which are new in the remote repository and track them. And first, we need to get the branches. Okay, this is the first step. So the way how you're gonna do it is like you can always check what that remote branches with the command git branch and tell me what that remote branches right now there is just one branch, origin mainly because you didn't update your local repository. So first you need to update your branches in your local repository, which are pointing to the remote repository with the command git fetch. And now get vetch. What will do it will just track a new branch which is called drought origin. So when you go for git branch remote, you will see that now there is a drought branch and when you go for a good branch, there is no drought branch. So what just happened? So when you run the git fetch command, git will ask remote repository, please. Are there some new branches? The remote repository reply in this case, yes, there are some new branches, so good, we'll track those with these remote branch origin slash name of the branch, okay? But these branches, origin slash Tao, averages read only branches. So when you go for git checkout or E gene slash tao, Yes. So when you checkout for this branch, you will see and message, which is very descriptive, always read the messages saying like you're in a detached head state. You can look around, make experimental changes and commit them. And you can discard any commits you make in this state without impacting any branches by switching back to a branch. So this is a very special state and you cannot drag there any changes without creating a new branch. So what do you need to do right now? You need to create a local branch which will track this origin slash name of the remote branch. Okay? This is the hardest part of the whole communication with the remote repository because you need to understand your aka, your local repository is not sync automatically with the remote repository, you need to specifically say git fetch. And then you need to specifically map branches from your local repository to the branches of your remote repository. Okay, so let's go back to, so as you can see, now, I'm in the detached state. Here is some weird number. This is the commit of the remote branch. And as you can see there is the drought Pi which I created on my Mac. But I need to have these branch also locally. So i'm, I'm going to check out back to to the master domain. Sorry. So I'm begging the main, there is no drought. And now I want to have this branch brow also in my local repository. So I'm going to create a new branch, git checkout b. I'm using Checkout so I can immediately, you know, check out into new created branch. And I'm saying like, please Good. Create a new branch immediately after the checkout me to this branch and create these drought branch from the read only drop branch from remote repository. And this is important when you run these, you will have a very nice output sank switch to a new branch drought. And the branch drought set up to track remote draw from origin. And in this way, when you run the git branch, you must see that we have the drought branch also in our local repository right now and we can do the changes. It's not the detached head state. So the only state which I showed you a couple of seconds ago, this is a perfectly fine branch where you can work. These phage could be a little bit complicated. It's absolutely okay if you are a little bit lost, we will talk more about these in the next lectures. So don't worry, it can be sometimes a little complicated. Now, the last thing what we need to do is check out the big graph. So when we click on the Get graph, we see that we have this drought regime, we have this main origin, we have the database access, so everything is linked perfectly. Before leaving and finishing this lecture, let me do one more thing. We don't need the database access anymore. It has been merged into the master. So let's delete it. How you're going to delete a branch. If you want to delete a local branch, you run the command git branch dash d as Delete and name of the branch, in this case that the base axis. Okay? So by running this command, we will delete the branch and the branch, the branch is no more there, So good branch, the branch is gone. But, you know, the history needs to persist. Why? Because this history is part of the main branch. Okay? So, okay, I hope you learn something new in this lecture, guys. I hope you enjoyed this whole class. Thank you very much for watching. I hope I will see you in the next lecture. 14. Git pull: Hello, my name is Mikhail hoods. Go and welcome to another lecture in our getClass. In this lecture, I will little bit clarify the topic from the last lecture. And moreover, we're going to talk about git pull command. So in the previous lecture, I showed you how you can sync to computers using GitHub as a remote. At the end, at the end of the video, I was showing some strange command git fetch, and we are creating some new branches, tracking some remote branches using origin slash drought trekking branch. We were talking about some confusing staff with a detached head and read only branches. At the beginning of this video, let's first look into my paint. So in my paint, you can see there are three parts of our current gets situation. We have a Windows computer, which is a first host, which is part of the good communication. Then we have a remote GitHub solution, and then I have a second computer, my Mac. You can see that on the Windows and on the Mac we have like two drought branches. The first one is called draw, while the second one is called origin draw. Both of these origins draw branches are here to track the situation in the remote draw branch, okay? Both of these origin draw and origin draw on Meg are read only branches, meaning you cannot add comments there. You can only read the comments from there and look at the situation there. You need to understand that these branches, both of them are part of your local repository, as you know, except the rocker repository in your computer, you have your working directory. That's the current situation in your Visual Studio code. Your working directory is always tracking one of the branches. Tracking means that your head with capital letters, pointer is pointing to one of these branches. The branch where the pointer is pointing to is the branch where your next comet will be tried to append it. So in case of drama, you can append your next changes. However, in case of orange and draw, because I said this is just the read only branch used for tracking the remote branch. You cannot add there anything or create a commit. This is important, okay? So now let's say you want to create some change in the draw branch in your Windows computer, we're going to talk how these changes are being propagated straight to the Mac, the remote, okay, and which commands you need to run. So you will start to work on some changes in your working directory. So you will change while one and you will change file too. Then you are done. You will run the at command. Yes. This add command will add the changes to the staging. And then you will run a commit command, which will create a new commit here. So this will be a new commit, okay? Now, what do you need to do is you need to push your changes to the GitHub. In order to push the changes you need that you're dropped branch is pointing to some remote tracking branch. So in this case, this drumbeat branch needs to be pointing to the origin. Draw. This we accomplished at the beginning when we were creating the branch in the previous video like checkout, dash B. Draw how you remember it, right? Draw slash space, origin or a gene. Sorry, I cannot write bra. With this command. We accomplish that the drop branch is sync with origin draw. And thanks to this, now we can run the command git push. By running the git push command. What do we do is we sync our origin, draw a branch with this new change. And moreover, we sink also the remote with our new change. Now, look at the situation. The situation from MEG is little bit different, right? Can enter the origin draw is not seemed to draw in the remote repository, right? So the MEG is thinking, well, I have all the changes and because gate is a distributed system, they, it, it won't sink automatically. You need to explicitly tell it to sync the local branches. Now. So what do you need to do is first when you will go to the two meg, you need to run git fetch. That's the command from the previous video. The git fetch will sink the remote tracking branch in the Mac. And it will add here this comet, right? And as you can see, the origin drop is one commit ahead of drug range. And when you want to, you know, connect two branches. So you want to sync this branch with this one. You need to use the merge command, which I was talking about in the couple of videos ago. So in order to sync your Mac branch with up-to-date commits from the drought branch in the remote repository, you should run first git-fetch and git merge, right. But because also on Mac, the draw branch is sync with origin draw. So it seemed remote branch thanks to the set upstream push setup string command, which I was running in the previous video. You can accomplish this with just one command, which is git pull. So as you can see, git pull and push our essential commands, but you can only use them if you have sync your local branches with the remote branches, you need to keep these in mind. Every time you run git pull, you are basically running two commands behind the scenes, git fetch and git merge. Please keep this information in the mind. This is the essential part of the whole course. Now, let's go to resource to your code to run some examples. So as you can see, I'm in my Visual Studio Code currently pointing to the drop branch and the situation is exactly the same as in the previous video. Now let's do something. Let's do some change in the draw. I will add new line and I will add here some, some nice texts like the picture, right? This is just a simple example. Now, when we run git status, we can see that there is one modified file and we want to create a new commit. Now most of you will maybe run git add and git commit. But if you have some changes in the file which is already been tracked, so it's not on tract, it's modified. You can accomplish this add and commit within one command running git, commit a M, am parameters. We'll look on all the changes in the files which are being tracked. Only tracked files. Okay. Please be aware of this and then it will automatically out all the changes to the staging environment. And then it will automatically create a comment from this appending, the current message which I will put here like at drought picture. Okay, interactive again, when you press Enter, you can see one file has changed to insertions because I added one new lie on this line and I created a new output on the second line, I want deletion. You will shortly see why these the deletion. Now, when you look at the good graph, you can see that new comment has been added here. And as I said, because these branch is in sync with the remote branch, what I can do is to run git push. By running git push, I'm sinking my local branch with the gate. So when I look now inside the good you can see I have you through branches. I will go to draw branch. And when I click on the comments, the last commit is added draw picture 43 seconds ago when I click on that raw picture, you can see that there are two insertions. One line, one new line was added, and one brain new line was added. And there is one deletion because we deleted the end of the line which was missing there, right, so this is the change what we did. Now, let's look inside our Mac. So the situation in the MEG is very familiar. As you can see, currently, the branch is out of sync, right? The repose, the remote repository is a little bit different. So as I showed in the picture at the beginning, first thing what we need to do is we need to sync our local branch with the remote branch. And ideally, we want to do the fetch and merge part in one step using the git pull. Because our drought branch is pointing to the origin draw because in the previous video, like Miranda, good Push, set upstream, upstream. You remember from the last video, we can run the git pull. Okay, So when I'm just to be sure, currently am in the draw branch, right? So when I run git pul, what will happen? Good will show us that it's doing something so enumerating seven done, blah, blah, blah. Now here you can see that utils draw has three changes, like to insertions. One deletion is written also here. And now when I look inside my draw file, you can see that the drought picture is here. And when I look inside my good graph, you can see that here one new commit has been added. Okay, So this was a very simple example how you can sync two branches. I showed you how to run the git pull command. I mentioned that it's important to know that behind the scenes the git fetch and git merge is happening, right? So please keep these inline while working with the gate. Okay guys, in the next lecture, we're going to talk about conflicts. Thank you very much for watching this lecture. I hope I will see you in the next one. 15. Git conflict: Hello, my name is Mikhail hoods. Go and welcome to another lecture of our class. In this lecture, we're gonna talk about merge conflicts in git. Merge conflicts are connected with merging of two branches which we're adjusting the same piece of code. It's very important to understand why they are emerged conflicts, how to handle merge conflicts, and all the details about them. In this lecture, we're gonna talk exactly about that before we move to the practical examples. And let's go together to my paint and recap one lecture about merging the previous lecture. Wherever you are talking about merging you remember that database access branch into our main branch. In that situation, we had the main branch at the beginning, a commit in the main branch. And from this gamete, we created a database access some branch with another commit. We also adjusted the main branch, right? So this is the main branch, and this is the branch database access in the history, right? So in that history, we added some new files in the database access branch, like the database handler or the Postgres handler, right? So we were manipulating the code which didn't exist in the main branch previously. The main branch, we are doing some cheese changes which we are not related to the database access changes. Because of that, it was very simple to merge these two branches together. The only thing what we needed to do was run git merge and get behind the scenes, created a merge commit for us and connected these two branches. Now, imagine a situation in which you want to merge two branches, in this case a branch called the Tao and a branch called main. So we will be playing with the drought branch which we already have in our project. Now, imagine in the drought branch you are manipulating the file main that by on some line. And in main branch, you are adjusting the same file main that by on the same line. So both of these branches where adjusting one file, the same file, on the same blanks. Now imagine you want to merge these two branches. Which of the branches will take precedence, right? Which changes are more important than the other changes, right? This is exactly what is good conflict. So you are trying to merge two branches together where you adjusted the same piece of code. In this lecture, we're going to go through an example where I'm going to show you how you can handle conflicts in the Visual Studio Code. Now let's go to our resource to the occult. And as you can see, my Visual Studio Code is exactly as in the previous lecture. So we are in the Dow branch, two commits ahead of the main branch. And since we created the drug branch from the main branch, in the main branch, nothing has changed. Okay. So everything is perfect. Currently, I'm in my drawbridge. That's the reason why I see it here. If you are on a Mac, you need to run the command git branch and you see that you are on the drought branch. Now, let's say that in the drought branch into on line five, we will adjust these output message adding here DAU. Yes, Just a simple word, okay, because of the simplicity of this lecture, I'm making some very small adjustments. So you are concentrating more on the gate rather than the code itself. Okay? But in real life, you can imagine like there are a bunch of changes across many functions or classes, right? And the conflicts can be and will be much bigger, okay? Now that we have created a change in our working directory, we need to push the changing to the staging environment or the staging area and create a commit. And as I said in the previous video, we can accomplish this within one command, git commit am. And we put here like a message, adjust main that I from the drawbridge. Okay? Now that we changed the branch, if we look back to the good graph, you will see that we have created one new commit. Now what do we need to do is that we will go back to our main branch by running git checkout, mainly in okay, that's the command for switching the branches in the gate. Now as I am in the main branch and if I look in the main that by their line five stay is still unchanged because I did the changes in the previous branch in the door, right? So I will adjust the same line here. Hello, world main, OK. Now, don't forget to create the comments. So again, I will run the same comment am command this time, I will put here adjust main PY from the main branch, I will press Enter. And if I look back to the good graph, you will see that suddenly Mane is blue. I am one commit ahead since I created the new drug branch and the drug branch history new commits. Why three? Because there is also this raw file which we created in previous lectures. Now we will match or we have to merge the drop branch into our main branch. Okay, so how are we gonna do that from the video, like previous video about merging. You remember the command, good match. And you should run this command from the branch where you want to branch, where you want to merge another branch. So I want to put drug branch into my main branch. So that's the reason why I'm running from this branch. The merge command dow. By pressing Enter, you will see something strange will happen. So it's saying outer managing main, that by conflict, manage conflict in Maine that by automatic merge failed, fix conflicts and then commit the results. So behind the scenes, good was trying to merge these two branches and look at these first do draw that BI was added because this was placed in the drawbridge, wasn't placed on the main branch. So it was very simple just to take the code from broader pie and put it into into main branch, right? So when I click here, this is exactly the content of the draw, that buy from the drawbridge. Now, what also happened is you can see that there are some conflicts. So first, you need to identify the files where the conflicts are and basically is written here, But if you forgot to look at the message and you suddenly don't have it there. What do you need to do is run git status. And when you run git status in green you will see files which were successfully merged. While red are the files which were unsuccessful emerged. And you need to change these files so you can see its main that BY, so when you look into main that by, you will see there something very strange. These green arrows and these blue arrows. What is this? Okay, it looks very strange and funny is either code or what is it? This is the way how good indicates the place where two conflicting files are trying to be merged. So first, you have your head location. So your head location is the current location of your branch. Okay, I mentioned couple of videos ago that head is the pointer to a pointer branch which is pointing to the last comic writing these case it was the drop, sorry, it was the main branch, right? So you can see that the situation here is helloworld from main. And then it is saying like separated with equal signs, like in the drawbridge might help. There is helloworld draw. Which one do you want? And then the top, you have three or four buttons. In this case, when I first look at these, I, I didn't know these are buttons but those are buttons, yes, you can click on them. First button is saying accept current change. This will keep these helloworld main and we'll delete these helloworld draw. Then you have accept incoming change. This one will delete the current change and leave the incoming change from the drawbridge. You can even accept both changes, in which case you will have the boat in the same file, or you can compare the changes if you want. If there is like multiple lines of code, you can look at it in separate windows and think about which of them do you want to keep or delete, right? So for example, if you click on Accept can change, the main will stay. If you press control Z, you can go step back, and now you can again click on one of these. So this one will stay, this one, accept bodies exit bothered when I click on Compare, I will have two windows side-by-side and I can compare the coats, right? So now it's up to you to decide which of the current lines do you want to keep here one important note, whenever you are managing a branch of someone else, for example, your teammate, it's important to set up a meeting together and talk about the situation, right? What has the President's, what, what features are more important? Which code should go first, which should be deleted, and so on. So this is important. Never do this blindly based on your intuition or stuff like this. Okay? So let's say in this case you want to keep the main branch changes. So you click on the Current and you will have here the helloworld main. Everything is fine, but we are not done right now when you look at the Git, git status, you will see that there is still this board modified. We created some change which we need to add to our staging area, right? So you need to run git add and the file aware of the conflict was merged. So now when you ran its status, you see that the goodwill say, I'll conflict figs, but you are still merging. Use git commit to conclude merge and create these merge commit, right? So how you're gonna do it exactly the same way it's written here. It's important to read the messages of good TO telling you what to do. Okay, I have experienced like many, like even senior programmer and I just ignoring the messages and what should I do? It's written there and they are like asking their colleagues like I don't know how to manage these and stuff like this. Okay, always read the messages in your terminal. So now we're going to run the commit AND gate will automatically open the VMM and it will generate the message, the commit message for you. So you don't need to put it there if you want, but if you want, you can change it. The out of the box message is merging branch drowning domain. That's exactly what we are doing. So we are fine right now. We press the Escape button, put the column here, and put here WQ. As I said in the previous video, this will create a new commit for us. So if we look at the good graph, you will see it's updated. The drama branch was merged successfully into our main branch. Everything is in our local directory. If you want, you can push it to your original directory. Okay guys, that's all for this lecture. It's important to understand what are the conflicts and how to handle them. My experience is that the conflict and the worst part on programming with good as of right now, you have almost all the experience you need to use good in a professional environment, in a professional team. You are just the core basics of Git commands. You are just helped to use remotes, how to set up remotes, how to set up secure communication. Thank you very much for watching this lecture. I hope I will see you in the next lecture. 16. Gitignore: Hello, my name is Mikhail hoods. Go and welcome to another lecture of our class. In this lecture, we're gonna talk about ignoring files in the gate and how to accomplish this using a file which is called gitignore. If you were like looking in some good project, you have seen these file in almost every project. And these file is very important. Now, first, let's talk about the use case. When you want to use the gitignore. Imagining, you have your project in your local computer and there are some files or folders which you don't want to push to GitHub. Let's say these files contain some logs from your application or some sensitive data like passwords, usernames, which are dedicated only for you and you don't want to share it with the rest of the team, for example. Now, this is exactly the use case for ignoring files. Ignored files are not tracked when you randomly dad and git commit, but they are held in your computer if you specify them. Now, in order to specify these files, we are using gitignore. Before we move to the example, you need to understand that there are three types of files in the good track files are those which were at least once added AND gate sees every change we just created in these files. You can see them with the anima later in your results to your code when you create some change there. Then we have untracked files. Untracked files are new files which were added to the working directory and get is ready to pack them into the commits. Now, there are, there is also a third category of the files. These category is ignored files. Ignored files are those which are just kept during the git add and git commit process. Now those are the files which you're going to talk about today. Now, let's look inside my Visual Studio Code. And as you can see here, let's imagine I will have here a file which is called Info deadlock. Let's create this file. Info that lock. Hi, my name is Mikkel imaging that this info that log file is gathering all the logs from the whole application and it's part of the working directory. Now, this info deadlock is useful for development, but you don't want to push it into gate because everyone has its own file and this file will be constantly change and so on. If you think of this, this info log files are very common during the software development. For example, sometimes you want to ignore the whole folder with these kind of log files, for example, for warnings for errors and stuff like that. Now, if this is not familiar for you, if you are working as a frontend engineer or you are going to be working as a front-end developer. You will most likely be working with some, some frameworks like React or, or stuff like this. Now, these kinds of frameworks are creating the structure, folded structure, which is called node modules, right? And it is very common not to push node modules into the gate because there are a lot of node modules. Folder is big and you are recreating this folder every time you run npm start or NPM install, either know what I'm not a front end developer, right? So that's an ideal candidate to put or to ignore, right? So how do we ignore these files or folders in the good? We ignore them by creating a file which is called gitignore. But before doing that, let's look at our git status. So, so far, the good is recognizing changes in the info dot login. It's attempting to add it into the next comment. If you would run git add and git commit, this file will be part of our next commit, but we don't want that. So we need to create a file which is called gitignore. Git. Ignore, sorry. Yeah. And these gitignore is important. Here you specify all the files which you want to ignore. So in our case, we want to ignore good info deadlock. You separate the files with new lines. Now, as you can see, by adding here info deadlock, suddenly the file, file change the color from the green into this gray one. It depends on which color template you are using for your Visual Studio. Coby, My case, it's a, it's a gray one. And it means like Mikhail, this file is being ignored and it won't be part of the next commit which you will create. And this is exactly what we need to do. Now in the gitignore, you can specify as many files as you want separating with the new line. Now, git ignore is very powerful, powerful. You don't need to specify it one-by-one. You can hear even specify a whole folder. Like for example, if you want to ignore everything in the utils, you just go for slash utilise folder and this will ignore the whole utils folder and stuff like this. Gitignore uses tool which is called RegEx for specification of the files. This tutorial are the scores is not about red Xs and the regex is a big topic and there is not enough time within this lecture to explain that today exists. However, I highly recommend going to the Internet and putting down in your search engine sentence like gitignore, RegEx. And you will find there a web page where you can, where you can see all the examples for different ways, how you can specify multiple files. Let's just make a very quick example. Imagine you want to ignore every deadlock file in your directory. So you go for like slash star deadlock. And this means you want to ignore every file which ends with deadlock suffix. Okay? So those are just little info about RegEx, but this is just the basic lecture. And I wanted to show you how you can name the files which you want to ignore. So by running these, when we go for git status, you will see that the log file info block is no longer available hearing the status because good is ignoring this file. Moreover, good recognize that we have created the gitignore and it's expecting it to be part of the next commit, so we can add a delegate at that. And good commit message. Git ignore. Now this message like add gitignore is most likely happening at the beginning of your project as a first, you know, push on the internet, you can find examples for gitignore, for different programming languages which are already prepared for your use case. You can go ahead and check them if you want. Now, before concluding this lecture, I want to mention one more thing. Imagine now a situation where you want to stop drinking. One of the files. For example, these drought that pipe, your manager or your team decided like this draw that buys no longer needed. You want to stop tracking this file within your good buddy. You want to still keep it in your local computer. So if we would like to delete it, we can run git RM, right? But this command will delete the whole file also for your local file system. And we don't want to do this. So first thing what we need to do is like specify we want to ignore it for the future like utils slash grad Pi. So util sludge draw that by, but this won't help because good is already tracking this file. You cannot just change the tracking file into a ignored file by specifying it in the gitignore. You need to explicitly say good, since now on, for the next comments, please stop tracking this file. So how are we going to accomplish this? We will use get RM, but with a special parameter. So we run the get RM, but we will put here dash, dash cached option. And this option, what we'll do, we specify the path to the file. So draw that by, in this case the option, what they'll do, it will delete these, draw that pile from the index of our good. So this file, what won't be tracked anymore. And if you look here, you suddenly it will take time. At the beginning it will be red, but suddenly it's gray, meaning this file is ignored. Now, when you go for a git status, you will see that you'd recognize you deleted utils, drought that pipe, right? We deleted, but just from the index right, from tracking this file won't be no longer correct. And the draw that by it's still here in my local computer. Okay, so this is important to have in mind how you can stop tracking file by using gates are Memcached in combination with the gitignore. So now when I go like it at that and I go like four good commit message removed. Now forget about the imperative. Remove, draw the pipe. You will see that if I go to the good graph, everything is perfect. There is one more new commit, but we can also put it into your remote. So good, Push main, the main branch, it, you'll take some time. Now, let's check the remote. And when I check the remote, you will see that in the main branch, the last commitment done by me is called removed address the pine. And if I go to utils, the rod at Pi is no longer available here, right? But we have it in our local computer so we can still play with it during the development. Okay guys, so in this lecture, we were talking about the gitignore. Gitignore is very important to understand how it works. It's part of every professional project. So when you will be joining some company, you will see these gitignore files. It's important that you understand what is the purpose of this file and how they work. I hope you enjoyed this class and I hope I will see you in the next lecture. 17. Git reset: Hello MY helmets coherent and welcome to another lecture of our gate class. This lecture is special. We are going for more advanced topics. Till now, you have learned all the necessary commands which are needed or required if you want to work with good professionally. All those commands which I covered in the previous lectures are sufficient for you to start the position where the gate is required. In this lecture, we're going to talk about time traveling. I'm going to show you how you can use git to go back in time within your commits. So I'm going to show you one of the most powerful ways or tools would you get provides you to move back the change is reverse the changes which you created accidentally or which you don't want to push to your branch. Now, within this video, we will start with the command which is called address it. It's important that you know that you can use or you should use the dress it only for your local changes which were not pushed to the remote repository yet. Good Rest set is a common tool for programmers while they are developing and they make some mistakes. For example, imagine you are working on a certain feature of your application in your custom wrench, you have created couple of files, you have created couple of commits. And now you realize, oh, the last two comments were wrong. I want to go back to the previous commit, which was like two commits before, just to delete those changes and start from scratch again. This is how you should use git reset. So let's start with the practical example so you better understand what I'm talking about. Right now. I'm in my Visual Studio Code and the situation is exactly the same as in the previous video. Instead of using good graph for this video, I decided I will use mostly the command line because these topics are more advanced. Instead of looking into a good graph, you can see your last comments running the good log one line, as I mentioned in the previous videos. So as you can see, the situation is the same. Currently, this is the good log one line for the main branch. The last comment was removed drought at Pi, which is already pushed into the remote, as we can see here, by label origin slash main, our current head. Yeah, So the current pointer is pointing to the main branch. We can also see it thanks to here, and we can see all the history, the good history here. Now let's start with a simple example. Imagine you are creating some changes in your file and you put here some mistake. So for example, Helloworld main mistake. And you create also a mistake in this file database handler. So connected mistake. Now let's see how does it look like? So we go for the good status and we see that we have like two modifications here. Imagine that this mistake is going so far that you also get, add these mistakes to your staging environment or to your staging area. When you go for a git status, you see two green files in your staging area. Now, before creating, coming to you realize, oh, I did something wrong in these files. I want to undo the good at how do we undo it? That's where the good Reset comes into play. So urine the good reset and you specify the file. You want to reset. If you remember the lecture about the good the MV or get RM, which I was running in the middle of the lecture. I did some trick running address it head, it's very similar. Liquid rested hat is an old approach. You can just run the dress it without head and specify the file which you want to put bag just to the working directory and not put it into your staging area. So if you run the good Rest, Good Main, you will see that if I go to the Git status, suddenly this file is an array-like, modified but not tracked within your staging gap. Let's put it back. Now. Imagine you want to get reset all the files, how you're going to accomplish these just by running address it. Okay. My rounding these everything is like outside of your staging area right now. So you can be, you can be working Cooley and everything is fine. Now, let's say that you have it in your staging area. And let's say you want to delete it from the staging area, but not only that, and you want also remove the changes. You want to get rid of these mistakes. How you can do it. You can run the git reset with a parameter which is called heart. By running address at hard, you not only clear the staging area, you also delete the changes in your working directory. Please keep in mind, get arrested heart is a powerful tool and you cannot undo the good rested heart or it's not easy, okay? So never use good rest at heart when you are not sure, what are you doing, okay? So given a set heart is here only for the edge cases where you really want to get rid of something, okay, That's the git reset hard. Okay, Now imagine a situation that you will create, will create here a test folder desk, right? And inside this test folder we will have a file one that by, right. And in this file one we will have just a simple print like file one. Yeah. And imaging, we will also create a commit, so good at here. And we go for. Commit, git, commit message at file one. Okay, and let's make things more interesting. We will create one more file, which will be file to file to that pipe. And the file to that Pi will be exactly the same as phi one. Let's say we will have here a file to write. So this is good. Now let's add also these change and add these files to here. Now, if we go for good log dash, dash one line, we will see that R, Sorry. We will see that our current commit history changed, right? We have to do new commits, these at file to an outfile one, which are two commits ahead from the origin main now, so the changes are only in our repository. Now imagine, we realized like, oh, we created these two files, these two comments on those two committees are wrong. We need to go back in history, back to these original commit, how we can accomplish this. That's what we're going to talk about next. First you need to see each commit has these numbers. So good behind the scenes is using something which is called a hash function. These numbers and letters, those are the hashes for the commits. If you know the hash functions, you know that there is a very small chains that the hash itself will repeat a couple of times when you have multiple hashes, but the chains are very low, so you can think of it as a unique identifier. The hash itself is much longer. These are just first seven characters from the hatch behind the scenes, the hashes much longer. So why am I talking about the history? Because you need to tell it like please go back into history to the hash of this one. And how are you going to accomplish this by running address it. So if you provide a good Reset another parameter, so good. That's it. Like this. You will tell him like please go back and the commit history to this commit. And now you need to specify what it should do with the changes. There are three options, soft, heart and mixed. We'll start with a soft. So when you are indeed like this, what will get do? So first, it will move the head and the whole branch main. And it will, it will be pointing to this DCD commit, VCD, right? So it forgot all the two previous commits, but he didn't delete the changes. The changes are still in your working directory. And moreover, because we run the git reset soft, moreover, these changes are still in your staging environment. So if you're doing git status, they are still here, right? So this is the good soft. Now, let's go back in time. Now, we went back in time and let's go forward in time. And now you can go for reading time, but you need to remember the committee which was there, right. So I need to scroll scroll, scroll back here. Yep. This is the, this is the commit of outfile two. And now you can use resit address, not just going back, but also for abiding time. So git reset here and just to make things like, good, we will put here heart. I will explain later what these are doing. So now I'm back in time, right? So if I go like good luck. One line, as you can see, this is no longer green and the two commits are back here, right? You can use git reset to go back and forward now. So the first was a first parameter was the soft one. Now there is also a second parameter which is called mixed one. So instead of running soft, so the same DCD blablabla committees here. So let's go back here. But instead of running it as soft, we will run it as mixed. The same situation will happen. If I go back to one line. I'm still pointing to this DCD as I did with soft. But in this case, if I go for git status, you will see that these changes are not staged, right? I have it only in my working directory, right? So this is the mixed and now you guess what will come next. So I am again going forward with git reset hard. Now, I will show you what will happen if I run the git reset going back in time with the heart parameter. So an SEM, I guess when I ran this one, this will delete all my changes. So it will move the head back to the DCD SI asked for, but I will also lose my changes from my working directory. Changes are gone, cannot do not think. All right, So this is good dress it as you can see, you can specify any gamete. I could specify even this first coming, right? But you shouldn't do that. Why? Because rest of this code is already part of the remote. And some people may be using remote. And then you would just change the history and push your change from just this commit and saying, Well, my new main is pointing to this right now. And your main should do, right? It will make the remote confused because suddenly the whole tree structure of these comics changed, right? So use Reset Only in case if you want to change some local changes. One more thing which I want to show you, okay. What if we want to recover some version from the history or What if we want to read some version from the history? You are a newcomer and you are interested in these commit. For example, how does the working directory looked in this commit? How you're going to do that. So first we're going to copy the commit hash or the sharpness of the commutation. The next thing what we should do, You will use a command which is called git checkout. And as you, as you know from the previous videos, git checkout is moving your head, right, the head with a capital head. So the main pointer, and it's, it's used for pointing to a different branch. So either using git checkout for changing the branches, but you can also use checkout to point your head to a specific commit from the history. So let's change our head and point it to this one. So as you can see now, we have the same output as fever running fetch, right? So we are currently in a detached head state. So currently we cannot write any new commit, but we can read, we can read the situation from that commit. And as you can see, it is also like hinting as what we should do now. But before we do this, let's look at our luck. So if you Good luck. One line, you will see that currently there are just a few comments, right? If you look at the good graph, you will also see that currently you are pointing here, right? And there are just a few comments, right? You cannot do anything, Michelle. Yes, this is not the branch. It is also hinting us by providing these strange letters here the same way as we had in the phage part from the previous example. So what we can do now the answer was already presented here. Well, we, this is telling us if you want to go back to your main branch, you should run git switch minus. But if you want to do some, some, some changes here, you should create a branch from this point, and you can do it by running command gets switch C and the name of the branch. So when you run these like this and you press Enter, you will create a new branch, as you will see in our graph. So there is a new test branch, right? Which is like here. There are some uncommitted changes. And if you want, you can create these changes starting from this commit and anytime, anytime right now. So if you look git branch, we will have here the new branch test we created with the good Switch command. And anytime you can back to your McMaster. Sorry mate. So if you go main, all the changes are still persisting in your computer. And anytime you can go back, test and do some changes. So these two powerful commands are here for you to travelers the history of commits, right? Please keep in mind good dress, it is very powerful. You should use it only, only for your local changes. Never use good read set for something which was already pushed to remote. Okay guys, this checkout part or the second part of this lecture was also interesting. We were talking about how to switch our head to a certain comic from the history and then create a branch starting from this commit. These are more advanced commands which are used by good developers all around the world. Feel free to repeat this lecture men as many times as you need in order to comprehend this topic. In the next lecture, we will cover another more advanced topic. I hope I will see you in the next lecture. Thank you very much for watching. 18. Git tag: Hey guys, because what's go here and welcome to another lecture of our class. In this lecture, you will understand what are good at, what they are used for, why they are so important, and why you should learn them. Now, let's recap the whole situation. Currently understand that we are using Git to store comments. And comments are somehow connected with the changes which we were creating through the time within our source code. Imagine you have a lot of comments within your main branch. And your main branch is storing all the source code. If you remember, in the main branch you had all the commits. And after merging some branches into the main, you could also see the different commits from different branches. Now, sometimes there are too many commits for you to understand what is happening in every commit. And sometimes you want to store working versions of your code through the time. Now, if you are using, for example, some programming languages, I'm sure you are familiar with versioning of programming languages, right? Or some software or some libraries. They have these versions with three numbers separated with a dot. And many times they are using some things which is called semantic versioning. Now, the semantic versioning is telling you what are the working versions which were published into public. And you can rely that these versions will be working without any bugs or errors, or at least they hope they will, it will work well lately they will find some bugs and they will fix it with new version. But the idea is that the current version should be or is without errors and bugs. Now, to store or to track these versions within your source code, get provides you tool which is called good tax. Why do we need good tax? Because as I said, sometimes you have too many commits in your Git repository. And it's very hard to remember all the commit hashes which are pointing to a specific versions of your code which was working and which was released for the public. Okay, in this lecture, I'm going to show you how to work with get Dax. As you can see, this lecture is almost at the end of our course or class. The reason for this is that I have been working in many companies and I see that many times people are treating these tags as some advanced topics in good, but that's not true, right? You should use tax. And if you are currently working in some company and the company's not using tags, you should encourage your team to use tax and to store Tags and pointing to the working versions of your source code. Now, let's go to the Visual Studio Code and look at some practical examples rather than talking about this. Okay? As you can see currently I'm in the same directory is always good tutorial. And in the previous lecture, if you remember, we have created some test branch. So if we go like git branch, you will see that we have here draw, main and test. We don't need the test. So I checked out to the main because most of the time you are having your tax with your main branch, right? It's, it's quite a common pattern. Now, get provides you two types of DAX. One or first one is lightweight tags and second ones are the annotated tax. Lightweight tax are working like a pointer to a certain comment in the commit history. And you can just name these commit with some tag name, right? So lightweight tags doesn't store. So lightweight DAC doesn't store any other information besides just pointing to a commit in the history. The second type are the annotated tax. And from the name, you already can feel that they are pointing to some committing their history. And they also store some additional information, some annotation, some metadata about the, about the commit, right? These annotated tags can store also like the name of the person who created the stack, the date, when was the stack created the email of the person who created this tag and also some short description which is at the top of the comic description. So that's some additional description. Now in this video you will see how to create them. So let's look into Git graph. And this time we're going to use our good graph is you can see that the graph looks exactly the same. Now, how do we work with tax get provides you to which is called git tag. And by running the attack is this, you will list all the tags within your repository. Currently we don't have any tax that's obvious. So there is nothing. How do you create the TAC simply by running git tag and here you specify the name of the tag. This video, I'm gonna talk about versioning and how you should use the names for your versions. That's the homework for you. Go on Internet and Google something about versioning of software and learn some best practices. Maybe later I will release some class about this. So now you are saying it plays create the tack and where does the get created attack? It creates it on your head. So on, on the commit where your head is pointing, the question is, okay, Mikkel, where he's my head bond pointing. You can see it by running git log one line. Good luck. One line is telling you currently your head is pointing to a main branch and top of the main branch is pointing to commit DC, the 60 e o. Remove Dao, that pi. So exactly the top of your good graph. So let's go back to the Jaclyn and create here Attack, get that, and you specify the name of the tag. In this case, we will go with week one that 0, that 0 when you specify a command like this, git tag will create a lightweight DAG. So this is the way how you create the lightweight back. When you press enter, you will see that in your good graph here will appear like this tag, like sang mikkel. Your tag is pointing to this commit and this is your version one that, oh, that 0, okay, When you go now to your console and you run git tag, again, I can make it bigger. You will see that GTAC outputs now one of v, That one that's 0, that's 0, right? So that's the tag which we created. Now, before we move to the annotate, the tags which are more common, let's think about or talk about how do you delete the stack. If you want to delete that, It's as simple as running good, DAG, dash d and the name of the tag, in this case we that the one that's 0, that's 0. So the same way as we deleted the branch in the previous video by running these GTAC, you will see that deleting tack output is printed and saying like, Oh, it was pointing to this commit but it's deleted now. So these were the lightweight tax most of the time, the use case for lightweight tax is just local. Most of the time people are not pushing these tags into remote, right? So the lightweight tax serves a purpose as a bookmarking a book, right? So you have there something important and you specified there most of the time people are using lightweight tags without the Sama versions, right? They put there something like Friday work or I didn't know saturday work or I don't know Mickey Mouse fix, right? So anytime they can come back to the stack as simply as running git checkout name of the tag. I will show this command later in this lecture you will see, but let's go back first to the annotated tax. Now imagine you want to create annotated tack exactly on the same point. This is right now how you're gonna do it by running it back the a, and here you specify the name. Let's call it the same way as I did in the previous one. And now what do you need to specify here is a message for these annotated tag because as I said, annotated tags has some additional metadata. And one of the metadata is the, is the message. So into specify the message if you don't specify when will pop up and you will need to specify the message from him the same way as you as if you don't specify a message for commit. So if you want, if you don't want to see the Vim, you will run command with dash m but ammeter. And you specify here the message like my first release. When I press Enter, this will create an annotated tag which is pointing to my current head. And this is how you create the annotated tax. It's very simple right? Now. What you can also do is you can tag a comment from a history. So imagine you want to specify at these commit, this merge a branch Dao tag, which will be like 0 that nine, that nine or 0 or one that 0000 release candidate, right? It depends on on what what kind of versioning system are you using, right? So how are you going to do it? How we can create the tag in the history. So in order to accomplish this, you need to know the commit hash for this commit and you got the commutation. You remember from last video, git commit, git commit, good luck. One line. And this will output the names or the commit messages with the commutator. And we want to map these new tags with this one, as I said. So you copy this ID and you go like get that. We want annotated tag version. I don't know 0 that nine, that nine. And in this case I want some fancy message like release. Let's go like prairie breath. Release, version and use specify after the commit with the tax should be pointing on. So when I run this, it will create another tag here. It's simple. As you can see, creating tags is simple. Switching deleting packs is simple. You know, right now everything about tax. One more thing. You mentioned, you want to push these tags to your colleagues. So how you're going to push the tax into remote? Now first, first thing which came to your mind is maybe like running git push. But by running git push, you are pushing only commits. So if you want to push tags or remote repository, you need to explicitly said with the parameter dash, dash, dash x. In this case, good will push the tags which are created for your current branch to the remote. As you can see now, the local tag that nine, that nine is mapping the remote tags that 99. So please keep in mind if you change some tag in your local repository, which is already been tagged with the remote repository. You need to make sure that you will change also the tagging remote repository. Okay, it's important to have this in mind. Oh, I forgot one thing. In the lecture I said you can go and anytime switch to the tag. So before I check the GitHub, how it looks like, I just want to talk about these. You can, anytime I run git checkout the same way as I showed in the previous lecture with the tag name. So by running git checkout V that 0, that nine, that nine, your head is currently pointing to these tags 0 that 99, as you can see here, and it's in the detach state, hate that, that stay detached head state, right? So as I said in a previous lecture, this is read-only state. You can check the code how it looks here. But if you want to work with is you need to use the good switch C command, which is written here in order to create a new branch, right? Because tax are not branches into keep this in mind. But let's go back to Main by running gets which a minus. And let's check how does the remote looks like after pushing the tax the command which he ran couple of seconds ago. So as you can see, something here changed before. Here was 0. Now we have to tax. And what we can do anytime we can click on tax and go through the tax, or we can go to this menu and click on tags and switch our current view to the status or to the state of the tag. So this is how you work with tax. Please keep this in mind. Tried to use them as often as possible. Thank you very much for watching this lecture. I hope I'll see you in the next one. 19. README: Hello My Kahoots go here and welcome to another lecture of our good course or good class. In this lecture we're going to talk about breed me that AMD, or we're going to talk about Markdown files. So let's start with looking into our repository in our remote GitHub. As you can see, these GitHub project is little different compared to the other public GitHub repository. So you can find on the Internet, for example, I have here opened bite and official Python GitHub for C Python. And as you can see this, this whole repository is little different. When you scroll down at the bottom of the repository page, there is this README that RST or read me that MD. Many times it's read me that then d In this case it's read me that r st. And here you can see, here it has a lot of texts which is specifying what is this project about how to use this project, how to build this project, how to run the project and your local computer and stuff like these. These readme files are very popular with GitHub projects or any good projects on remotes. Because many times you have your repository public and different people are checking your goal. And these people don't know about your code. They don't have time to go through all the code inside your repository to understand what is, what is this called about, right? And you want to help them leveraging this. Read me that MDR it mean that RST file, this file should contain all the necessary information for either to understand what is your project about. In this video, I'm going to show you how you can create your own custom read me that MD and how you can leverage these markdown, you know, style of writing text, right? You need to think about it, not as a code, It's a formatting style, right? So you will understand through this lecture how to leverage these to the full potential and how to create your own read me that MD in your project repository. So let's go to the Visual Studio Code. And for this video, I prepared already a file which is called the Meta them to you can just right-click and create it in, but you need to make sure it ends with MD. And these file contains an example markdown. Markdown is, I said is a way how you can style your text in order to be, you know, pretty after you publish it to your GitHub. So you have these beautiful read me that MD page on your GitHub repository. Now, for the purpose of example of this, of this lecture, I have created this, read me that MD in advance. And now I want to show you one great tool in Visual Studio Code. This tool allows you to preview the read me that MBB for you, push it to the repository so you see how these Markdown we'll look in your remote repository in order to do this, I will first just hide these left painter because we need more space. And now I will click on this, on this icon on the left, on the right top corner called open preview to the slide. And when you press this button, you will see a preview of the markdown. So the left side is translated directly to the right side here. And you can see how the text will look like after pushing it to your remote repository. Now let's go just briefly through some units tricks with markdowns. If you want to go to more details, I highly recommend going on to Google and checking out. I was still like when I was thinking about this lecture, I wasn't sure if I should add it to this good tutorial or not, because this is mostly connected with the GitHub itself, not with the good tool, right? Good. That has nothing to do with markdowns, right? It's not part of the good implementation. But many times on, many projects are using these markdowns. But I know that here are a lot of beginners, software developers, and I want to show them how to use it. Okay, So let's just go through these examples. If you want to create a typo in the markdown, you will use this hashtag. You can use multi-level titles using multiple hashtags. Here you can see how you can write text, yes, employ write texts, split it with the new lines. You can also put here your links with HRF, right? So you create here the link which cannot be highlighted on the right side. And then in round brackets, directly after the square brackets, you will specify the link where you should be redirected after clicking on this one link, okay? Then you can use Italia x, you can use bold text, right? Using guide and all these two stars or two underscores or one star for italics or one underscore for italics also, right? So, so these are the tools. Then if you look on the items, you can have this item lists specified with the star. You can have, you know, embedded item list. When you tab it using tab or multiple spaces, you can have a numbered list, although it starts with one, it will be numbered starting from one. You can have your code snippets, and now called snippets are very powerful because many times you want to put into read me that MDE, you know the instructions, how you can install these program, this code in your local machine. So you want to specify the steps and be very exact here, you can put Inline Code with one backticks. Backticks. This vector is a special character. I had a hard time when I was the first programmer or I start programming to find where on the keyboard is the back tick on my keyboard is the left, top corner and the escape button, right? You need to have an English keyboard on your special keyboard for your language. But you, but it really depends on your keyboard layout. Sometimes it can be next to enter or next to right shift, so you need to search for it. So this is the inline code you can have also multiline cone. This is much more used to using three backticks. Then you specify multiple lines of code, then use again the three backticks. Now as you can see on the right side, this code won't be highlighted. Many times. You want to have these kind of fancy highlight. For example, here you have C. You can see the highlighted Python code, and you can accomplish this by running three backticks after that's specified name of the programming language which should be highlighted or which could be used for highlight. And then you specify the code for multiple lines. If you want to use different languages, please refer to Internet, write code to there and write a read me that the MD, I don't know JavaScript highlight, but it should be as simple as writing JavaScript. Or I don't know what kind of fancy programming languages are you using for programming, it's up to you. So you can also have the tables. For example, you specify the first column, second column, you split the columns with the rows with these dashes, and then you specify here contents for each row. So it's simple as this. Okay? So if you want to know more about the microbiome, please go to internet and effort to some official documentation. Now, Let's go through the process of how you can publish this to remote publishing this as simple as creating a commit with this. So as you can see, this is an untracked files. So good status. We'll report that I have read me that contract. So first at the Read Me that MD. Now git commit the changes with some fancy message like at the ReadMe, and it's as simple as this. Now what do you need to do is, of course, a push your changes. I'm in the main branch and this will be pushed to the main branch. We sure you are on the main branch because most of the time and you are opening your repository, you are on the main branch, but you can have the Redmi didn't need any kind of branch if you want. Now, this was pushed, Let's check out the remote. So after checking out the remote and refreshing, you can see that the whole content, which was like previewed in my Visual Studio Code is now transferred into my remote repository. Okay, so this was just a short lecture on how to use markdown files with good, in this case it was with GitHub, okay, please use them. Help your readers of your repository to understand what your code outside of reading your code itself, right? It's very helpful. Sometimes it's worth to put here some documentation about what is different function doing and how you can install it in your computer. As I mentioned, I hope you enjoyed this lecture and I wish I see you in the next one. Thank you very much. 20. Git behind the scenes: Hello, my name is Mikhail hoods. Go and welcome to another lecture of our class. In this lecture, we're gonna talk about some advanced mechanics which are applied behind the scenes of this lecture is absolutely optional. You don't need to understand the staff in order to apply or use gate in your professional software engineering life. So again, behind the scenes is storing the data in your local computer. Why? Because gait is a distributed system. So it's relying on the machine where it's installed, right? Good. Is not relying on the fact that there is somewhere a remote server where you're going to store everything? No. Really Z-line just on your computer. So what does it mean in order to store some data, you need to have some kind of file store implemented locally on your machine or some database in this good behind the scenes is using something which is called key value store. So every file in gait and every historic filing fee to which you created somewhere in one of your commits, previous commits is stored within your file system, within the folder where you have your Git repository. If you remember, one in one of our first videos I was showing you how to initialize and Git repository in one of your folders in your local machine. We were running the git init command. After we run the git init command, git created a folder which was called that get in your local file system. That is exactly the place where the key value store is located. In order to use key-value store, we need some keys and we need some values. The values is, are mentioned are the contents of the file which you want to store. But what are the keys? In order to generate a key for one of your files? Get is using a special function, a cryptographic function, which is called SHA-1. Sha-1 is a cryptographic hashing function which is generating a hash for an input. So you can think of it as a black box. You put inside these SHA, one black-box your file and SHA1 will generate a very specific, unique identifier with 40 letters and numbers. It consists of 40 characters. You remember these commit hashes, those committees, she's our outputs of the SHA1 function, right? So good is using goals. So this essentially one output as the commit hash, or just first eight or seven characters from it to make things more simpler. But behind the scenes, there is a longer 40 character long token, which is a key in this key, value storage. Now to understand these things better, Let's look inside my paint. You remember when we were talking about branches, I mentioned that branches are just pointers into comments in your history. So we were talking about the master branch. And from this picture you can see that master branch is pointing to a comment. As I mentioned, community is identified by the unique SHA-1 outputs Dogan or commit hash. Now, the committee itself carries some metadata. One of these metadata is, for example, the name of the guy who created the commit. The time when it was created at the commit message will what this inside and the climate also has two more fields. One of the fields is a reference to a previous commit. We can chain them in a linked list manner. And then the second information is an inflammation of a tree. The tree is the folder structure of the staging area from which you created the commit. You remember when we add files to the stage and got out, there can be multiple files, right? And good needs to store this information in these three file, which is also start in the key-value storage. And three file itself got its own SHA-1 commit Tolkein, uh, sorry, token, it's not a common token, is just a token or, or hash. Now if we look down, the tree itself can consist of multiple files or blobs. Now, Blob itself is another thing which is stored in this key value store within your dad get folder. The Blob itself has also its own SHA-1 hash. Now, if you are familiar with hashing functions or maybe you remember some, some, some things from your university. You know that there is a slight chance that for two different files, the hashing cryptographic function will output the same token. This is a disaster. We cannot have one or the same commutation, commutation for two different commits, right? So you need to keep in mind when you are using this function, there is a slight chance, but you don't need to worry much because the chance that you will get the, you know, uh, same token or same hash for two different files is very, very, very, very, very, very, very, very low. To make things more clear, I have created for today's lecture and empty folder, It's called get Desdemona Eng English. And in this empty folder, we're going to create or initialized and your Git repository. And we're going to look through the Git folder to understand the structure and the files which are stored there. So let's go to the Business Studio Code. Currently I'm in this folder which I showed you a couple of seconds ago. Now I will go to my terminal. I made sure that the terminal is pointing to the right folder and I will initialize an empty git repository. The repository is being initialized. So when I look back to my file system, I will see that there is the dot git folder. Now, here are a lot of files and folders and let's just briefly go through them, okay. Because this is an event staff Hooks has some hooks which are applied when you are pushing to remote repositories, but out of the box you are not using hooks, so you don't need to take care of it in fall is just some info file which we don't, which we angular cover in this lecture. The important files and folders are coming next, configures itself is the conflict which we were talking about before, right? The information about you, your username and blah, blah, blah and remotes on orange gene and URLs and stuff like this. Description is the description of the project. And then you've got your head. The head itself, when we open in Visual Studio Code, is just a pointer to one of the branches in your repository. So currently your head is pointing to refs slash heads slave master because you are currently on the master branch. So when you go to the location there, you will see that there is serifs, there is heads, and there will be a master file when you create some commit because the, you know, the branch itself cannot exist without commits. But because this is out of the box branch of the master branch, it has to exist because you need to have some exists, right? So it's like a chicken egg problem, right? So that's the reason why this is empty right now. But when you will create here, some committee will see here some, some data, some information. So and as you can see then there is this important objects folder. In these objects folder, that's the place where you were. The key value store will store the information. Now it's empty. Now let's start with the simple file. We will call it the best that the extinct. And we will put the, put here information like 9, first file. Now, if you look at the git status, you will see nothing unusual untracked file and you go back to this folder, there is nothing. Now, let's imagine you will add it good at and when you add the file to the Git, git will store it also in the key value store. How, when we look back, suddenly there is a folder which starts with B6. When you look inside the B6, there is this beak strange file. This file is the output or the name of the file is the output of the SHA1 function. Okay, So these and the B6, of course, because you need to concatenate together the name of the folder and the name of the file to get the unique identifier, the hash in the key-value store. So that's the key, the B6 and these name, but what is inside this file? So when you would like try to cut this file by GUID, I don't know, objects, you go for B6, you will get just some strange texts because this is a binary file. You just cannot read binary like this. Yes, you need to use special tools which keeps, allows you or provides you to read this file. In order to read this file, you need to use a function which is called git cat file, dash p. And here you specify the whole token for this file. So like this and you delete this backslash here, right? So I just copied the full path starting from the folder objects without the backslash is. And when I press it, you will see that the content of this file is my first file. So that's like the proof that really get behind the scenes is storing the history in this key-value storage as a, as a, as a binary objects. Now, we didn't create, okay, Misha, but you mentioned three files, right? The three commited, right. But there is just one file. Where are the others? To get the rest of them, you need to create the commit. Let's create a commit. Let's go like gamete message. And let's call it any show, go meet. And when you press this and you go back to the folder, you will see that in objects you have two more files. Now, why do? Because when you go inside this one, there are 22 more files in this folder. So currently we have three objects together. Two are in these nine C, and one is inside the cell B6. But what are these nice he files, right? So so so what is it? So when you go like LS, that gate or yeah, LA, that, that good slash objects, right? You will see that in nine see there is, like Nina's see, there are these two files, but what is inside them? So for example, if we want to cut this file, we will use the same command as before, and we go with nine C and first look at the first one. I hope I will be lucky and I he'll hit the first one. Yeah. The first one is the committee information. So as I mentioned in the paint. So good stories here. The information about the outer lets me write the commutator, That's me, that's the same guy, write it. There is also information about the commit message and about the three, right? And these three identifier is the second identifier in that in that same Folder into objects folder, right? It's nine C 90, the 09, see it's here. Nine d, d, d, 0. So the second file is the information about the three. So if I go inside here and instead of printing this commit, commit hash, I will put here the three hash. These three got the information about the files which we are apart of the staging data when we were creating this commit. Okay? So as you can see, get is storing this data in this key value storage and everything is there. Now imagine you will create here a change like you will put the year my name. What will happen if you like git commit am, and you put here second comment, right? What will happen now? So when we press enter and we go back here to our objects location, suddenly there are like 1233 new folders. So what is happening for every new commit? These three objects will be created. The commit, the three and the information about files. I'm, I'm, I'm talking about three objects, but if you would have multiple files for each file that I created a new object, right? So please keep this in mind. Every file is stored in this key-value storage, and even repeatedly, repeatedly when we are changing it through the commits. And now when you think of it, this can be sometimes inefficient, right? Imagine you have file of it, which is, which has 11 gigabyte of data inside there. And you have it in the first commit, a new story there, right with the commit. And it will create these three objects. And then later you will change in this one gigabyte big file, just one line, right? Very small change. And because of the system good, we'll create a new file for it, which will be again one gigabyte big. And when you create one or a 100 commits, you will have the size of this folder will be 100 gigabytes, right? So does it mean recall that the good is inefficient? Well, it depends the way, how, the way you, why this works like this is because good wants you to give immediate results when you are moving through your history. It wants to give you the immediate file. It well, when you are applying these changes approach, where you're just changing changes, it's sometimes very hard to collect all the changes from the history and output the file as it looked like in the history, right? This is the approach of good is very fast because you just look inside the file, get the whole value from it, and you give it back to the user now. But Git knows that efficiency's important. So git allows you to optimize the format of the stored data by adding function good GC. So when he ran good GC, good will compress the content of the objects file into something which is called a pack. So when I go back to objects, you see there are no more folders and files. Everything was packed inside the pack folder. And here you can see there will be a blah, blah, blah, back. And what is inside this back? You can look at it. So there is a command which is like, good, very Phi back the v that gets slash objects, slash back, and there will be that back. So when you run this command verify back, you will see that in this compressed version, our two commits, two blobs and two trees. So these compression behind the scenes will change the changes when you have like big files, we just small changes on a few lines, right? And this is how good is compressing the whole folder in the whole history into smaller, smaller files. These good GC is running, are happening every time you run git push, you remember good push output. It was very similar to this Git GC output, right? It's because it's running exactly the same thing behind the scenes. So before you push the changes into the remote, good will pack them around in good GC behind the scenes. So as you can see, it is nothing else than a key-value storage. And everything is stored in your local file system in your dad get folder. Please never delete your dad get folder. That folder is very important and in this folder lies the whole content of your history. If you like, accidentally sometimes pushed your password into there When someone will have access to your dad get folder, he or she can extract your passwords from the history. Okay, so it's important to understand what is happening behind the scenes. And I hope that this lecture helped you to understand it. Now, please let me know in the discussion if you have some questions about it, there is much more to talk about. But I don't want to make this class too complicated or over complicated. And as I mentioned before, this is exactly everything what you need in order to be a professional game developer or professional software developer using it daily. Okay guys, Thank you very much for watching this lecture. I hope I will see you in the next one. 21. Project: Hello, my name is Michelle and welcome to the last video of our class. Yes, it's the last one. If you came so far till here, I want to say, thank you very much for watching my whole class. I spent so much time creating these topics and preparing the videos. I'm glad you came here. In this lecture, we're going to talk about the small project which I want to assign to you. I believe you were one of the best students which I ever had. If you still have some questions or answers to problems, please write down into discussion. Um, I'm trying to reply to everything in the discussion. Even after one or two years I published this course, I'm getting notifications when you've read me down there. Okay, So please write down. So what is this project about? I want you to create your own project repository with some gametes, with some branches, police practice merging branches, create multiple branches, at least three of them create their some tags, then merge the branch into the main branch, right? Bullshit, to a remote repository, creates some ReadMe file, right? Don't forget to apply everything you have learned so far. Thanks to this class, I want you at the end to create the picture of your good graph and send it here as your project. You can also add a link to your public GitHub repository if you want. So me and the other students can check out your code. I mean your Gita knowledge and reply to you, maybe with some ideas how to improve and so on. You can use any programming language you want. The whole idea is to test your knowledge whether you understood all the topics which were covered in this class. I wish you, you will use this knowledge in your work life in some company where you will work. You can reach out to me anytime one more time. Thank you very much for watching. I hope you enjoyed all these lectures. My name is Mick outscore, and I hope I will see you again. Thank you.