 It is very usual to try many things when we first start working on a game. When we do something during the development and we don't like it, we just control C and try something else. But if you are making drastic changes in many places, you won't always be able to just undo your work. Another thing that might happen is that you removed some files, nodes or data and you have to recreate it because they are unrecoverable. If you know what git is, dealing with deleted files or reverting changes is not an issue. I'm still surprised about the amount of developers that don't use git when developing video games. Let's see how to work using github and after the video is over you will have two super powers, the power to turn back time and the power to never lose a file again. So what is git? Git is a program for tracking changes in any set of files. As you work on your project you make checkpoints of your code whenever you want. This means that you can travel back in time to any checkpoint and continue from there like nothing happened. I'm going to be using the official github client but most visual git programs have the same features so it's not a requirement to use this one in particular. You can also do all this from the command line but if you can do that you probably don't need this tutorial. You will now need to create a github account, download the desktop app, sign in and you should have everything ready to start the tutorial. Go to github.com slash new and create a new repository. In this case I'm going to call it git tutorial and we are going to make it private so no one can see our super secret project. Then I will just create the repository. Once you've created you will see this ugly design screen with a lot of text but we only want to click here and set up in desktop. This will open the github desktop app and set up the repository so you can start working using git. As you can see here it will ask me if I want to save it and what's the path of the repository. I will just click on clone. Now let's open the local folder, you can do it by using the show in explorer button and now you can paste your gotot project. I'm going to be using the new project that Kenny posted in twitter, I'm going to leave a link in the description if you want to download it and use it as well. Now let's open the project in gotot and we see the game here. Now that we added the project, when we open the github app again, we see that there is a lot of files which are all the files created in that folder. So let's make it a checkpoint with all the things we have now because now the project is something. So let's say first, commit. Let's click here and commit to main, you will see that all the files will disappear from this list but now in the history tab we see now that there is one commit here which this is a checkpoint which is the first one. If we want to sync it with their website so you can open this project in different computers you can publish the branch to github. This will make it so that whenever you clone or you download the github repository you will get all your files and also all the checkpoints and the state of your code in each checkpoint. Let's click on publish and everything is good now. So now that we have our project, let's see how change looks for the program. If we want to move the characters from position, let's say let's move this fly over here and this be, let's move it over there, there and save the game. When we open the github app you will see that there are changes in one file. The file is game.tncn which is the scene that we just modified and saved and it will tell you what was the code before and what is the code now. It is here highlighted what we changed, in this case it's the coordinates of those two instances. The other stuff that we saved sometimes is how cutout parses the code but that doesn't matter the fact that we changed this, it's enough. So we can create a new checkpoint called moved monsters. It is important to name the commits properly because this is the only reference you have of what you actually done in this checkpoint that is different from the others. Let's commit it to main and let's sync it with the server pushing to origin. So we have here the first commit and the one that we created just now moving the monsters. If you prefer the characters to be in a different position that's very easy because here you can press ctrl c two times and you should be able to have it in the same position as before. But let's say that we do more changes. Let's say that imagine that we started playing with this style map and then we added a bunch of things here and then we decided to change the character visibility to red and suddenly we tried the game and it's not exactly playable. We cannot go past through there and I don't really like the red color. So one thing I can do even if I save and everything is I can go here to the give have desktop app and you will see all the changes that we made. You can just right click this card changes. Now when I open it again in Godot it will tell me that the scene that I have opened changed and I can reload it. So let's reload it and everything is back to how it was before. That means that I can experiment try implement something new and if I don't like it I can revert the changes from github. The same will happen if you modify it from outside Godot. Let's say that I accidentally remove the sprites folder no problem because I can open the app and I will see here the latest changes mean that I remove all these files and I don't really want to remove them so you just select them all and this card ate selected changes. This means that they will be again in your repository and we can see them here. As you can see github is really powerful especially if you are dealing with some plugin for instance if you are using my plugin dialogic sometimes from version to version things might explode you might lose some timelines in the middle and oh no where is all the work that I've done. You can always go back to your history and see what the changes were and go back and forward to those. One last thing that I want to cover is what happens if I made some changes and I push them but I want to revert them well no problem you can just right click revert changes in commit it will create a new revert commit which will undo those changes and you can push them so everything will be the same as before. This is just the surface of what you can do with github there's a lot of cool features and you can even create parallel universe with different versions of your game and the project can get very complicated but this is a must thing to learn if you are working alone or on a team. I encourage you to try it to experiment with it and I always recommend that if you are working on a project please set up a gith repository and make even if you forget a daily commit to never lose the changes because now everything that we did is on a private repository that we can access or we can give access to specific people and you can always download the project see the changes and you will never lose any change ever again. Since this is a fairly new project there's not a lot of changes but if we go to the dialogic repository you will see that the history is very long it has the time what the changes were who made the changes because in the case of dialogic we have other people also contributing code and the best thing about gith is that you're not saving the entire file on the server you're only saving the changes that happen on those files so if many people are working at the same time in a project and they are making changes to the same files you will be able to modify the same file but a different line. If you like this video you want me to cover more features about gith and how to use it in game development please leave a comment I will leave some extra links in the description if you want to learn more about gith because this is a program that can be used for everything not only game dev so I hope that in your current or your next projects you start using it. Thanks everyone and see you in the next one.