Github + GameMaker - Everything You NEED To Know

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello Joe welcome to another tutorial today's video we're going to be going over source control github and game maker and how to use all of these things together I remember when I first started using game maker I remember reading that game maker and github and source control don't really work well together there's a lot of issues and this is definitely the case in some regards but it's also not as complex as a lot of people made it seem and I'm gonna go over everything that you need to know in this video and everything I've learned over the past year of using game maker and github together so that you can hopefully have a more enjoyable experience and you can learn how to use this tool because it is a very valuable tool when you start to work on different projects with different people so in this video I'm going to be going over everything that we have in this list and hopefully explaining everything that you need to know and to get you started and some of the situations that I've encountered that tended to be problematic and some simple tips and tricks on how to work around those issues so that you have a more smooth experience working with this tool I'm gonna put some timestamps in the description down below so if you want to skip to certain times and skip some of this information that you may already know since this is gonna be a complete guide on how to use everything there might be some stuff that you're already familiar with and you might just need to learn some of the more complicated things such as like how to deal with merge conflicts in game maker and dealing with yyp files that are conflicting and how to know which files you should accept and which ones you should should trash so all of these things are we're gonna cover in this video so if you need to skip to certain time points check the description down below I'll have timestamps in there ok so let's get started we're gonna start at the very beginning I'm gonna cover what is source control I'm gonna cover what is git and then we're gonna work through some things let's go ahead and put some to-do lists basic man line commit okay cool so here we go so here's our list let's get started so what is source control well source control is a way to manage and backup and keep track and organize your files on a project that you're working on so for example let's go ahead and go to a folder ok so here I have a game maker project and you can see all of the files and folders that you would normally see when you open up a GameMaker project you know we have our scripts we have our rooms our objects our sprites so these are this is just a normal game maker file and so what happens is we have something like this we have this folder of just our files right and this is going to be just our game maker files right so we can say oh this has our yyp file and this is essentially just a representation of this folder okay so we have all of our files in this you know or let's call it a folder I can write okay so this is a folder or we're going to be a little more technical and we're going to call this a directory alright folder and directory are the same thing and as you can see our directory has a bunch of files in it and those files might be folders just like this one is okay so we have this folder directory that exists on our computer and source control all it does is it just takes this folder this directory and copies it to a server okay so I'm gonna say this I'm gonna copy this over here and I'm gonna say oh look at here is a copy of our files but the difference is is that this exists on a server whereas this exists on our PC okay so all you're doing is you're just taking a copy of your files and moving it to a server now you still keep a copy of those files on your computer and you have a copy on the server and what you're doing is you're sending and changing and trading and exchanging and doing all these different things with different files between your PC and the server so when you update a file on your PC you need to send it to the server and when a file updates on the server you need to pull it from the server and put it back on your PC this is especially true when you have two PC's working on the same server so you might have two people with two pcs pointing and working on the same server and each of those people are going to have a copy a local copy of this project on their computer but then they're also going to be sharing and working off of a server project okay so this is why source control is super helpful because not only does it create a backup of your file so in case let's say your computer gets stolen or your hard drive crashes or you just lose your file somewhere using source control is a way to backup those files so you always have them I remember last year my truck was broken into and my laptop was stolen and I'd been working on this project like two years and I remember I was really upset about my laptop being stolen obviously but I was most happy that I had recently just pushed all of my changes to my server and I didn't have to worry about losing my project progress on my project because everything was backed up on this server if you didn't have source control and your PC was stolen for example you would lose everything and there'd be no way to recover it so not only is source control very useful for backing up your files and creating a secure copy that you can retrieve anywhere on any computer that has an internet connection but it also opens up a very streamlined way to work with other people on one project and this is where github and source control and other source control tools are very valuable as they allow a nice way for a bunch of different people to work on one project at the same time ok so that's an overview of what source control is now what is git you'll hear a lot of people say you know get and github and a lot of people think that these things are the same thing but they really aren't get is a I don't really know how to describe it get is git is like the tool for source control and github is the way that you interface with that tool so git is kind of the most common source control out there but github is also the most popular interface to use with git so there's a lot of different other tools that use git that are called different things but github is just the most popular tool that uses git if that makes sense so get is the the thing that's doing the source control and github is the website that accesses get that does the source control for you okay so get and github are two different things but a lot of times when people say gets they a lot of times mean github synonymously because they're both kind of the the two most popular tools that a lot of people use so people just kind of use those terms exchange' bleah but they do mean technically different things so we in this video we are going to be using both git and github so we will download get on our computer and then we will create an account on github where we will set up our repositories and do all of our stuff like that so I just want to explain what the difference is between those are okay so we've done source control git and github okay so let's go ahead and download the tools that we need to and then we're gonna go over how to set up our first repo and do all of that stuff so the first thing that we should do I guess is we should set up a github account so let's go ahead and open up Google and we're gonna say um let's go to github.com and you're going to just sign up and create an account okay so pretty straightforward very easy to do just go ahead and sign up an account it's free you don't have to pay anything and then yeah okay so you've set up an account on github rate that's one of the things on our list let's go ahead and mark that as done alright so the other thing that we need to do is we need to download get we need to make sure we have a command line we can work with and then we're gonna download some sort of GUI UI interface to work with git so there's two different ways that you can work with git and one is through a command line interface and one is through a GUI or like a UI interface we're gonna be using both of those I think a lot of people like to just use the GUI because it's a little bit easier but I'm gonna show you how to do command line because I think knowing how to type the commands is really really valuable and guess just allows you to use git on any computer no matter where you are whereas GUI does allow you to do certain things easier such as merge conflicts so we'll be using both command line and GUI tools in this video to work with our git repository okay so let's go ahead and download some of these so the first thing we need to download is get so let's go ahead and open up into tab where and say download git and if you have if you have homebrew on your Mac or chocolaty on your PC you can download get using those tools it makes a little bit easier but if you don't just go ahead and come to this website and choose on your operating system that you have I'm going to click Windows because I'm on Windows and it should download automatically for you so I'm sorry to have this but you're gonna go ahead and hit open and it's gonna start to run so all you need to do is you just need to run through this installer once it opens up just go ahead and click through you can just set defaults to everything don't worry about any sort of configuration or anything like that just go ahead and just work through the installer and get it installed alright so once you have get installed I'm not gonna do it cuz I already have it on my computer but that's pretty much all you need to do forget so you have git you should be able to test this by opening up your command line so if you go to Windows search and you type CMD or if you're on Mac and you type terminal hit command space to open up finder search and hit type terminal and you should be able to open up a window that looks similar to this maybe a little different but similar we type git - - version we should see some sort of feedback get version 2.2 for all right so if you don't get this if you get some sort of command that says get is an unknown command then that means you haven't installed get correctly and I recommend you go look up either a youtube video or some other documentation on how to download git but you should know that you have get installed properly when you see this sort of feedback it says hey this is the version of get that you have on your on your computer ok so you have get installed you've created a github account what's the other thing that we need to install well I did mention using some sort of command line or terminal so if you have this great we're already partway there every computer has this installed on it so you should have this it's just a matter of finding it again if you're on PC it's called command line you can type CMD or if you're on Mac it's called terminal they're essentially the same thing okay so on our list so do we have we have the command line boom done we have github or get installed awesome done so what are we gonna use for our GUI interface well there's a lot of different tools out there that exist for us to use I'm gonna go ahead and use Visual Studio code I like Visual Studio code it's not explicitly a source control interface but it works as that and it has it downloaded so I'm gonna go ahead and type download Visual Studio code and they're going to click on the first link and again choose your platform and download Visual Studio code so I already have it downloaded so I'm gonna go ahead and open it up and all that Visual Studio code is is just a text editor but it also has it has built-in integration or github and source control so this is the same thing as using like supply sublime or notepad plus plus or Visual Studio they are just just text editors that allow you to work with a bunch of text or code but it also has a few other built-in tools with it so again like I said this is not explicitly a git interface but it doubles as a get interface and I like it a lot because I can also use it for typing code and I can use it as a get interface so once you have this installed we're gonna go ahead and close this for now we're gonna come back to it we just want to get everything installed and we're gonna use again as I mentioned we're gonna use that as our GUI interface or github okay so we have everything installed we should be ready to go let's go ahead and set up our first game maker project and show how we can get started with the basics okay so I'm gonna go ahead an open up game maker all right so I have game maker open you've probably seen this window before a million times let's go ahead and click on new alright and we're gonna choose whichever one you want doesn't matter for this project you can you know it source control doesn't matter if you're using drag-and-drop or game maker language so this will work for either version of the project that you're working with so I'm gonna go ahead and click on game maker language and I'm going to just go ahead and create this somewhere I'm gonna put this on my desktop and I'm just gonna say test gets project all right so I've created a project and a game maker file okay so here we are we've created a new project now you can do this with an existing project so let's say you've been working on a game for three years and you now want to introduce source control great congratulations it's better to do it now than never to do it even if you're already really deep into a project so you've decided to do this on an existing project or a new project it doesn't matter the process is all the same so what are we going to do well we have project we need to figure out how to as I mentioned in our picture here we need to figure out a way to copy our contents of our project on to our server so let's go ahead and create our first repository and then we will show how to move these files into our repository so what is a repository a repository is basically just a fancy way of saying a project that exists on your server it's the same thing as like this folder this folder is kind of a repository except for it exists on our local machine it doesn't exist on our remote server okay so what we need to do is we need to create a repository and that's just a fancy way of saying a github storage bucket for our code in our files and stuff like that so let's go ahead back to github and we're on github and in this top right corner let's see if I can zoom in a little bit Oh perfect in this top right corner you can see that I have this plus button I'm gonna go ahead and click this and I'm gonna say new repository okay so you're in your github account you say create a new repository here we are so now you're out this screen and you're gonna name your repository something okay so I'm gonna say test gets project now it doesn't have to be the same name as your a GameMaker file I'm just gonna name it the same because I mean this is supposed to represent that project so I want them to have the same name you can give that a description but you don't have to so I'm gonna say test project before I cannot spell project today project for github tutorial and I'm gonna go ahead and set public and I'm going to click on initialize this repository with a readme ok this step makes it a lot easier if you don't do this you have to do several other steps to get things working so just save yourself the time and click on this box it'll help you out a ton okay and we're gonna hit create repository and it is created here we go we have our first repository and this is the window that you're gonna see a lot when you're working in github this is kind of like the home page of your project so if you're working on a project for a long time you're gonna see this page a lot now I'm not going to go over everything that's on here but I will showcase some of the stuff as we work through this tutorial ok so here you can see we have our beep oh we have our project here and all we have is this readme file and if I open it up it just says our description that we put on here okay so nothing crazy now there's some stuff you can do you can upload files you can edit files you can do all that stuff through here but we're not going to do any of that we're going to do all of that through our command line first and get started so the first thing that we have to do is this is okay so let's not get lost let's go ahead and let's take some notes and so we don't get lost in this steps step one let's say one creates repo a step two we need to clone the repo so what does that mean cloning a repo is just taking a repository that exists on our github server and bringing that down to our local computer ok because as I showed in this picture we have a connection between our PC and our server so we need to make that connection how does the PC know which repository it's supposed to be working on on that server so we need to clone the repository down to our PC so that they know to communicate with each other ok so I'm gonna go ahead I'm a copy the URL or this so if you can see I'm gonna go ahead and click on this I'm gonna say ctrl C and I'm gonna copy that alright now we're gonna open up our command line and we're gonna learn a couple basic commands all right there's a lot of information here I know we're going through it fast but hopefully if you have any questions you can leave them in the comments you can shoot me a message on twitter or discord or you can google search them there's tons of great resources all right so let's learn a couple commands before we clone we're gonna learn CD and dirt and what are those well dir if we type that just list the contents of our directory and if you remember I was saying that this is the same thing as a directory this folder is a directory and you can see that we have this path right here C Drive users aah ray so if I come to here and I say C Drive users aah ray you can see that these are the same files that are here this command line is just a text representation of our files that we have on our computer so we're seeing the same thing we're just seeing it through two different ways one is a GUI interface and one is a tech interface so by typing out dir we can see the contents of our directory that we are in well we need to move our directory to different areas so we can work with different files so I'm going to go ahead and type CD and I'm gonna say desktop and if you notice desktop is on our list so we can access that directory from this current directory way in so I'm going to say CD desktop I'm gonna hit enter and now you can see that we're on our desktop so if I type dir again you can see that we have a bunch of different files sitting on our desktop and including this test kit project that we just created so wherever you created your game maker project we need to move to that folder and you can do that through a combination of CD and dir if you want to you can say CD dot dot and this will bring you to the folder that you were just in beforehand so you can see that we're back in C users aah raid if I do dear we're looking at the same folder again so I can say CD desktop and now I'm back in the desktop if I CD dot dot I'm back in the folder so we're going back and forth between just using these commands ok and that's what dot dot is it means the parent directory that we were just in beforehand ok so if I goes again CD we're gonna go back to our desktop I'll clear the screen and I'm gonna list the contents alright so now we're on our desktop hopefully that makes sense it was a very very fast introduction to command-line man's but those are the basic ones you need that are not get commands that we're gonna go over in this video okay so now what we need to do is we need to clone the repository that we created onto our computer so again we're gonna copy this URL that exists for our repository and I'm gonna come to the command line and I'm gonna say git clone and I'm gonna paste the command or the URL in here ok and now I'm gonna say enter so what's happening is we have a repository named get test to get project and we have our GameMaker file named test project two of these files cannot exist in the same place at the same time with the same name so we need to change the one of them so I'm gonna come to our desktop and I'm going to change the name of our test gate project so I'm going to rename this test get project local okay so now if we come back to our command line and I hit up on the keyboard it's gonna try to do the same command again so I'm gonna hit enter and now it's saying cloning into test get project and we have a couple things here that we can just ignore but you notice we're back on our desktop so it looks like everything has finished so if I go ahead and minimize all of my windows and I take a look at my desktop again you'll notice that I have a test get project here and I have a test to get project local well if I open up local you'll see that this is my game maker project and if I open up test kit project you'll see that I just have the readme file which is the same readme file that we have here so what have we done what we've created a copy of our repository on our computer and but we still have our previous game maker project so these are not linked up because there are two separate folders that exist simultaneously so what we need to do is we need to take all of our contents of our game maker project I'm going to ctrl C I'm going to open up our repo and I'm gonna control V alright so now we've put all of our contents into our project now you could have skipped this step by just creating your new game maker project directly into our repository but we created the project first and then created the repo second so we have to move all the contents into it so that now instead of working on our local version instead of just working on this this folder that exists we're working inside of a local copy of our github repository and a good way to keep that in mind and to know that is you'll have this readme file when you generate a normal game maker project you don't get a readme file at all see if you notice there's just our game maker files but because we created this from our repo you notice we have our readme file okay so now what we need to do is we actually need to close game maker and we need to open this project not from our local but from our github version and keep in mind that these are now two separate projects so you need to make sure that you're always working on the project that exists inside your repo because if you work outside of your repo project you're gonna have to copy then paste those files back in every single time and that's tedious and you don't want to do that so really what I'm gonna actually do is I'm gonna delete this local version of the project because I don't want that anymore I just want to work with the repository version of this project now keep in mind we will always have a local version on our computer and we will always have a remote version on our server but we need to make sure we're working inside of the git repository on our computer which is what we created by typing in git clone and then the URL okay so here we are so we have our GameMaker project in this file so now what we need to do is we're gonna go over some basic commands on how to just do some basic github stuff so even if you're working on a project by yourself and you have no intentions of ever working with anyone else this is still a great step to do because as I mentioned before you are creating a backup in case your files ever get corrupted or lost or damaged or anything like that you have a backup version to work with okay so let's say that this is our game maker project we're working inside of it we set up everything our repos good to go we did all that we got our website account set up we're good to go okay so let's say let's just do some stuff in game maker so we're gonna create a script when we say script do stuff and let's go ahead and create an op a sprite where it says sprite my sprite and we're going to create an object we're say obj objects okay so we've done some stuff in our game maker project now how do we update this so if I hit save and I open up my file my repository you'll notice we still have our readme file so we're in the right folder you'll notice that now I have objects I have sprites I have scripts which I didn't have before and I've opened it up I have script do stuff so this is updating as we save just the same way that we would on any sort of normal file right so everything is working properly now what we have here is we have all of our files in our local but our remote server doesn't isn't aware of it so if I come back to you know github and i refresh this page you'll notice that we still just have a readme file we we didn't get any of these updated files none of none of these files are in our github project it's just our readme so how do we update our repository with all of our new files that we have in our local version so this is where we're gonna learn our very first github command and I'm gonna go ahead and added our steps create repo we cloned repo move files into repo and we're gonna say updates repo and how our first step that we're going to use is we're going to say gits add so let's go ahead and open up our command line and we again we can make sure we're in the right directory by typing der and we are not we you can see that we're still on our desktop so let's go ahead and move into our github repository so I'm gonna say CD test get project and now if I hit dirt you can see that we have everything our objects our scripts our sprites and our readme file so we know we're in the right one for sure so again I'm gonna hit der to list out everything okay so now we're gonna learn our first command and this is called git add so if I say git add we're gonna get some sort of response in this is gonna say did you want to add something this command isn't complete well anytime that we don't know a command we can say get help and you can see that we're gonna get a whole list of commands back to us that kind of help us get started in case we don't know what to do and you'll notice that we see a command that we've already worked with before called git clone and this says clone a repository into a new directory so we've done that already nice okay cool so here what's this other category work on the current change Oh add okay so we did that one what is add do well get add adds file context to the index what does that mean well it just basically means that we're adding files that we want to send to the server so when we work on a project let's go ahead and visualize this real quick so when we work on a project we have our local project here so let's say this is a yyp file or GameMaker file all right and this is on our PC and we have our server over here and this is github okay so we have these two systems here and we have our repository here and we have our local project here okay and let's say that these are synced up so this is a cloned repository from our github server alright so when we want to add things to our server there's a couple steps that we have to go to so we've added some new files we want to say okay we're sending this to github we're sending this to our server how do we do this well there's a couple different steps that go on here firstly we add things to we commit things to kind of like a temporary workspace so let's say that this is like a kind of like a little bucket and so what we're going to do is we're going to say add this change to this bucket and we're going to say add this change to this bucket and we're gonna add all of our changes to this bucket okay and then what we're gonna do is we're going to use some other commands to later send this information to the server okay so that's what get add does so if we go ahead and clear the screen I'm gonna say git look have caps lock done let's turn that off I'm gonna say git add and I'm gonna add - - all and so now if I hit enter nothing came back and that means that our command has successfully executed we have added all of the changes that we've made in our PC version to get ready to send to the server okay so now what we've done is we've added everything that we've just changed so the new scripts that we created these new folders this game maker project everything that we created that isn't seen here we've added all of those changes to our intermediary section of where we're gonna send all of our code so we've added all of our changes to this okay so what we can do is we can then now commit this code okay and I say that because commit is our next command so we're gonna say get add all and the next command is gonna say it gets commit so if we open up our command line and we say gifts commits well let's let's actually say get help first and you'll notice that we have this one down here commit record changes to the repository okay so if we say get commit we also need to add some sort of message and what this is doing is this is saying okay this we've added all of our code to this little bucket here and now we want to commit this to get ready to add to this server so when we commit it we're kind of pushing it into a queue so let's say that this is all this is everything that we're going to make all of our changes and we're gonna add this commit to this little space right here okay and this is filled up so we've just added we've just filled up this little space with all of these changes that we just made and so what we can do later is we can create other commits and we can put this commit here so we're gonna say oh we're gonna here's another commit here we're gonna add all of our changes we've added so many changes to it and then we're gonna put this commit here and so we're gonna create a series of commits and these are these are a series of changes that are going to get ready to be sent up to the server so I'm gonna say git commit and then I'm gonna say dash M I'm gonna put a quote and I'm gonna say created project and temp test files and I'm gonna close that off with another quote okay so now what I've done is I've attached a little message to the changes that I just made so if I hit enter you can see that we added all of these different files to our github repository and if you look through here you'll notice obj object which is that object I created you'll notice script do stuff which is that script I created sprite my sprite so a lot of these changes are the changes that we just created that we have now committed to our repository so now the last thing that we need to do is we need to push these changes now this might seem like a redundant step because you're like oh well we just committed the code isn't that isn't that everything that we need to do well not necessarily we need to now push that code to the server and say okay we're finally done with it so what's nice creating this intermediary level is that if we add a bunch of code and we commit it and then we say oh you know what I actually don't want to do that what we can do is we can just delete this whole intermediary layer layer without affecting anything on our PC and without affecting anything on our server so it gives us like an extra layer of protection where we can say oh nevermind I didn't mean to do that I need to undo all those changes but what happens is when we push when we push our code we're taking all of this and we're finalizing it and sending it to the server for real it's finalized because if you notice if we take a look back at our github and we refresh even though we committed everything we still don't see it in our server so we need to push the code so usually a good practice for this as he'll work on a project all day and you'll do a bunch of commits every time you make a little change o commit - M adjusted player movement speed okay cool you committed that a commit M - M created new enemy cool I committed that you've committed all these different changes then usually at the end of the day if you're ready for those commits to be finalized then you will finalize all those with this command and you will say gits push and what that does is that takes all of your commits that are ready that you've created throughout the day and that sends all of them to the server and you'll notice that we finalized this so if we finally come back to github and refresh you'll notice that our server is updated so we have all of our stuff sent and you'll notice we have a nice little git message right here the little message that we set creative project and test files it's all sent right here and just like our Windows Explorer we can see the same files that exists here exist here all right so that's it that's the basics that's the the understanding of just sending making changes adding new changes and pushing those up let's do it one more time just for the sake of repetition and say that we feel good so I'm gonna say script do stuff let's add some code into our script so I don't know what we're gonna say we're say if they're solid equals collision point XY obj solid false false oh I never say if instance exists solid let's make sure that it's not defined if solid is not equal to none and instance exists then we're gonna say show message hello there alright so we've done all these changes all right so now we want to save these changes and send them to our repository so I'm going to open up a command line again we're gonna clear the screen I'm gonna say git add - - all I'm gonna say git commits and I'm gonna say added let's say new code to ser do stuff I'm going to enter so now we've created a commit let's say I want to add a new commit I'm gonna say show message hello there times two alright now I'm gonna come back to my command line I'm gonna say git add - - all let's say git commits updated SCR few stuff I'm gonna say so now I have two commits I've created two separate commits that each represent a different set of code changes okay so now I'm done with all of those commits I want to say all right it's time to send those to the server so I'm gonna say git push alright that finished up if we go back to our repository and we refresh we can come to our scripts we can say SCR do stuff let's open up DML and you'll notice all of our changes are here now so this is great you can just work on your project the same way you would normally and then anytime you do new feature you just say o get commit - M and then put a little message and you say ok I'm going to commit this code put a little message and you commit it and then when you're like ok this code is this whole thing is done I think I'm ready for this to be on the server you say git push now I usually like to push once several times a day and I commit usually depends on how many changes I'm making but if I'm making a bunch of little changes I can commit sometimes up to 10 times a day so I'll do 10 commits and maybe one or two pushes throughout the day it just kind of depends on the workflow everybody kind of figures out a different workflow that works best for them but anyway so that's an introduction to the basics of github commit and source control now with just this alone you could work all by yourself you could do a project and this is all you need or for backup if you're just trying to use source control in github for backups and so that way you don't lose your files this is all you need to know you just need to know how to commit you just know know how to push and for the longest time for about a year or two this is all that I knew about github and this is all that I did I just knew those few commands get at all git push commit get push and that was it that's all I did so let's go into some of the other scenarios and some of the more complex stuff if you are going to be using this with other people and that's where it really gets complicated is using github with other people so these are our basic commands that we are going to use so we get commits - em and get pushed okay so there's our commands let's go ahead and take a look at our to-do list basic command lines we've done that one we've set up our first repo and we've done our basic commands okay so now we're on to our intermediary commands I'm gonna explain what is branching what does that mean how to create new branches how to delete branches how to merge branches okay so now we're in the second part of the video where we're going to go over intermediate commands and then we're gonna work with some more of the complex stuff that you might see inside of GameMaker and github okay so let's say we're in our repository and we're looking at a repository here and we'll notice a couple different things at the top of this window you'll notice commits if I click on this so this is list of all of the changes that we've made to the project and this is really nice because if ever at any time you want to go back and see Oh what did I do just for that one feature you can find that feature and then you can open this up and then it'll show you all of the changes that you made to your project so sometimes there's only a few sometimes there's hundreds of changes and you have to sort through all of them and it can be tedious to do with but at least you have all this stuff documented and listed and available for you to access at any time which is really nice because there's a lot of times that I just don't remember what I did or I deleted some code and I need to go find it so I'll go dig through my old commits and I'll find pull up the code and be like oh that's what I did and then I will you know be able to recreate it or whatever so it's very useful to have this but you'll notice that you can see one other thing up here this thing called a branch and you'll also notice branch down here branch master so let's go and click on this branch and again you'll see this master branch existence has updated four minutes ago by Alex so what is a branch and what does that mean well let's go ahead and open up our drawing pad and I'm gonna explain to what branches is okay so we have our project alright we've seen this we've seen this window before this is our it it this is our gets project alright and this has our yyp file and this has all of our scripts and all of our objects and all of our sprites and etc etc right there's a bunch of stuff in this okay this is our repository right we're familiar with this now what we can do is we can create branches now what is a branch well think of it like a tree alright if you have a tree structure tree structure and you were to create a branch what we do is we take all of this code we take all of this code and we're gonna copy it down into a branch and then we're gonna connect it where say I'll look it's a nice little branch and a little tree and this might go even further you could have branches and you could have branches on branches and you can have branches on branches on branches alright you could have endless branches that all branch and stem from each other but what but what does this mean like what's the context of this well what happens is let's say you want to work on a version of the project but you don't want to make these changes to the global version of the project you want to just oh I want to experiment with something or or maybe two people are working on a project and they each want to have their own branch so they aren't both modifying the same thing so what this is is this is just a copy of the code that is segmented off into its kind of own version of the project and then what you do is you just make changes to this so I would just push to this branch I would just commit to this branch I would do all of my changes to this branch here instead of this master branch and then whenever I'm ready I could push these changes up master branch and you're gonna say Alex what's the point of that that sounds like an extra step that is totally pointless which is true if you're working by yourself maybe now there's arguments for that not get into that but the point is is let's say you have two versions of this project and let's say you have two people working on it let's say alex is working on this version and let's say matt is working on this version of this project so now you have two versions of the project that both stem from this master branch and now it starts to make sense you don't want both Alex and Matt to be working on the same branch at the same time that's just going to cause a bunch of conflicts which we will address in a minute but what's gonna happen is this allows us to work kind of independently and push our own changes to our own branch and then whenever we're ready we both can merge our changes up to this master branch or what you'll see in a lot of like companies in studios what they'll do is they'll say okay instead of branching like this our branch structure is gonna look a little different it's gonna look something like it's gonna look something like this let's let's take a look we're gonna say here is our master branch let's go ahead and create this this is going to be our QA branch this is going to be our dev branch let's say there's actually probably a production branch in here somewhere and then we have Alex and then we have Matt and so alex is going to work on this branch alex is going to push changes to this branch matt is going to push changes to this batch they're both going to push these changes up to let's say a dev branch and then that's going to get pushed up to a QA branch which maybe you have QA people work on it here and then this gets pushed up to a UAT or a testing branch and then so you have more testing here and then this gets pushed up to a production branch and then so this is being used for like the customers and/or people playing the game or whatever and then this gets pushed up to a master branch which is like the end-all be-all of branches so this is kind of a little more accurate of what a branching structure might look like and then on top of that your developers so like alex and matt down here who are working they might create versions of their project that are their own branches just because maybe they want to test something out and they want to work on it here and so a lot of times all creates like several branches and I'll say okay you know here's mine here's Alex's branch but I have you know I have one branch here and I have another branch here and then what I'll do is I'll merge these back up to my branch and then we'll merge these back into Matt so it gets complex and you can see where the complexities come but by being able to segment your code off into it's kind of little isolated bubble what you're able to do is you're able to manage all of these different moving parts in very kind of modular separated ways that prevent issues from coming up in the future so I was kind of being a little hyperbolic and explaining all this and a little exaggerative but hopefully this makes sense why branching is important because it allows people to work on individual versions of the project without working on somebody else's project right like imagine if two people are trying to work on the same file at the same time how does that work well it doesn't it's it's confusing it's complex that there's issues you know if two people are trying to type in the same file at the same time there's issues so in order to avoid that in theoretically in this situation we create branches that allow us to each work in our own space so if I go ahead and take a look at totem for example I think this will kind of explain the situation so let's go ahead and look at an existing repository all right and you will see that totem for example as a bunch of different branches all right and you can see there's Alex's branch there's Aaron's there's a milestone there's the master branch there's mats and all of these kind of have different parts moving there's different reasons for each of them you know some of them belong to people some of them represent a milestone some of them represent playtesting or whatever we want to keep a stable version but then still work on a custom version so there's a lot of different reasons to create branches but the most common one and the one that you will probably want to use is you want to create a branch for each developer or each person that's going to be making changes in pushing code to the branch all right long story short that is kind of what your your goal is going to be or it's a good place to start so you know we can say on our to-do list we're going to create a branch for each user all right so that'd be Alex Matt that might be Aaron that might be Marshall okay so everybody's gonna have a different branch and these are all gonna be everyone's gonna push their own code to that so if you notice when we made our changes we were pushing just straight to master branch okay so let's say we want it to create this is not the right one we're pushing straight to master branch so let's say we wanted to create a branch for ourselves how do we do that all right let's get started we're gonna learn the new github command and we're gonna type it in I'm gonna say git branch and what you're gonna notice is when I type in get branch it pulls up master branch and that's the only branch that exists in this repository there's only just the master branch so how do we create a new branch well I'm gonna say gets checkout and I'm gonna explain more of what this get checkout command does in a second but I'm gonna say get to checkout - B and I'm going to give it a name so that means get checkout and we're gonna say new branch which is signified by this - B and I'm gonna give it a name I'm gonna say Alex all right so now what we've done is we switch to a new branch called Alex so if I type get branch again you'll notice now we have two branches we have Alex and we have master and so now what we do is if we make changes in this project and we push those changes up we're gonna we're gonna be pushing to the Alex branch and not the master branch so the master branch won't change but the Alex branch will change so let's go ahead and create let's let's do something different let's um let's create a new script or say ser Alex's script and I'm just gonna say there x equals 100 all right it's gonna yeah it doesn't like that but what we're gonna do is we're gonna save this and we're going to come back to our command line I'm gonna say git add - - all let's say git commits created Alex's scripts I'm gonna say get push and what's gonna happen is the first time that we try to push to a new branch we're gonna get this error right here where it's gonna say fatal cannot do this blah blah blah just type this command okay you don't have to understand it just type this so we're gonna say gits push set up stream origin Alex and you have to do this at least once for every new branch you create but once you create it and once you type that command you'll never have to type it again for that branch so you just have to do that you're just telling github that this branch that you've created needs to to send its data to this point okay so you'll notice that if we come back to github and we refresh you'll notice that now we have four commits and we have two branches so if I go ahead and open up this branches you'll see that we have a master branch we have Alex so if we come to Alex's branch you'll see will come to commits what we have five commits here even though we only had four commits and if we look at our commits we can see created Alex's scripts and you'll notice that if I open it up oh it shows changes there's an addition of Alex's script and this line of code but if I back up and I go to branches and I go to master branch you'll see that we only have four commits and if I come to my scripts Alex's script doesn't exist because we haven't made any of our changes to master branch we made all of these changes to Alex's branch so what we've done is we've created a branch and we made changes to those branches and now we're able to push code only that we want to push to ourselves so what we could do is then we could create another branch if we want it to I'm just kidding I'm just getting wild here well I'm gonna say gits check out actually before I do this I want to explain one more thing so if I say git branch remember to create a branch I said git checkout - B and then I put in the name of the branch well check out it actually is a little bit different check out does not create a branch what it's doing is imagine you're at a library and there exists a bunch of books right and you want to check out a book well what does that mean it means that you're taking the book from the library and you're putting it in your possession so you're saying I want to check out this book this is now my book temporarily and then I'm eventually going to give that book back ok so check out is doing the same thing but it's working with branches so let's say I wanted to change my branch to the master branch well I would say git check out master and now I've switched to the master branch so what I've done is I've checked out the branch master branch to myself and now I'm working on that branch and so now whenever I say get at all or get push or anything like that it's going to master branch so make sure that when you're making changes that you're making changes to the correct branch that you're working on so I'm gonna say it gets check out Alex and now I'm back to the Alex branch and any changes I make to this branch is going to go to Alex instead of master so this is important to notice and this is important to pay attention to that is what the check out command does so let's go and add that to our list of commands so I'm gonna say get check out - B branch name that creates a new branch and gets check out checks out a branch for you you work with all right so what we're doing is when we say get check out B we're saying hey we want to check out a book that doesn't exist yet we're gonna check out a book that we are creating so we're creating a book a book right we're creating a branch and we're checking it out in our possession and then when we send it back we need to say hey we need to send you this book that I know it's a new book and you don't know it but we're sending it to you it's yours so that's what we're doing when we're say get checkout - B we're checking out a new branch and then but when we say when we want to check out an existing branch we say get check out and then we put the branch name here okay so that's checking out and that's the basics to branching now let's bring it back to game maker there's one thing I want to show and explain a situation here so I'm working here and oh what is this window oh it popped up well what's happened is when when we check out different branches and we make changes to our github repository we are actually making changes to this file structure here so the changes are actually being done on our computer behind the scenes when we don't notice it and what's happening is game maker is detecting that we're running a version of the project but the files have changed in the background so we need to tell game maker to reload now if we hit save we're gonna override those changes with our current changes so let's say we're in master branch and we check out Alex and then we hit save we're gonna save the master branch changes over Alex so when we go to commit and push everything up we're gonna override that branch and we don't want to do that right we want to preserve the independence of each of these branches so what we want to do is anytime the project has been modified now not every time there are some situations where you will want to save it I'll hopefully explain those in this video but what you want to do is you want to say reload because we're telling game maker a files have changed because we were modifying them with github let's have game maker update and reload those change files so that it game maker is up to date with our github okay so let's go ahead and let's go ahead and say get check out master alright we've checked out master let's go back to game maker let's give it a second because it takes usually a minute to love it all this okay I'm gonna hit reload and you'll notice that if I come to scripts Alex's script doesn't exist here anymore well it's because we're in our master branch and that that file doesn't exist so if we come back here and we say git checkout Alex and we would come back to game maker we say reload we come back to scripts oh hey look Alex's script exists there it's because we're in the right branch so again any time you see that window pop up after you've changed a branch make sure you click reload so that game maker updates to be the same as git otherwise we start to override files and then you have issues and you have to worry about like destroying your changes and doing all that stuff so that's never good to do now let's say let's say you're in the middle of doing something so I'm saying I mean Alex's branch right and I'm gonna say SCR Alex's script number two I'm gonna put some code in here like whatever okay I'm gonna hit save and let's say I go to check out a branch I'm gonna say get to check out I'm in the middle of some changes but I want to check out the master branch just for a second we're gonna get an error and what's gonna happen is it's gonna say hey you're currently working on some stuff you can't you can't check out a branch right now because you have things that you haven't done anything with git is freaking out it's saying hey there are changes do something with these changes before you just move on and we can do a couple things we can we can either commit add and do all the things that we have been doing so far so we send all these changes to the server and we do all that or we can destroy these changes and just get rid of them so sometimes maybe you've made just like a minor change and you're like oh I need to switch branches real quick and you don't care about those changes the quick and easiest way to do this is just say git stash now git stash is its own thing and I recommend you look into it it does have its purpose and its use but this is the quickest and easiest way but for now get stash is going to be our go-to little cheap way to get rid of current changes so that we can then check out a branch or make some changes you'll notice this when we try to merge branches later to that you can't merge branches if you have changes and stuff so now if I say get check out master we can check out master because we just we tossed and we stashed all those changes that we were working on and we said get rid of them we don't care about them we just need to check out this branch real quick so now if we come back to here and we hit reload you'll notice that Alex is script and Alex is script two doesn't exist and if we go ahead and get check out Alex and we switch back to here we hit reload I'm gonna script known as Alex's script two doesn't exist because we never save those we never push those changes we never committed them we didn't do anything alright so that's pretty much the basics to game maker and branching and checking out branches and doing all of that stuff you pretty much just need to know that to get started with branching and then again you do all the same steps that we did before in terms of like committing and pushing and sending all your code to the server but now instead of sending to a master branch you're gonna be sending to your own branch and then your other people that you're working with they're gonna send to their branch ok so that's pretty much it for that overview so we worked on creating a new branch now we can delete a branch like let's say you have a branch locally so let's say get if we type in get branch and you'll notice that we have let's go get checkout master so let's switch to our master branch alright if we say branch again you'll notice that master is selected and what we'll do is let's say we want to get rid of a branch we're gonna say get branch - D - delete and we're gonna say Alex now sometimes you'll get issues with this where it's going to not let you delete a branch that you're working on or that has changes so you always say get grant get branch - D but with a capital D and then type in the name of the branch and this will force the delete now keep in mind you are deleting this branch off of your local computer so if there's any changes on that branch that you haven't committed or pushed to your server you're gonna lose all of those but you'll notice that when we come to github then we refresh we go to branches Alex still exists because we didn't delete the branch off of our remote server we deleted it off of our local computer okay so there's a difference between dual eating branches off of the remote and deleting branches off the local now let's say you want it to delete a branch on your server well you come to branches and you can see this big red trashcan right here yeah you can just hit this and you can delete it keep in mind once you delete it there's no getting it back once you delete it from the server and you've deleted it from the local you have lost that branch forever now you get a second to restore the branch if you want but if you leave this page at any point and delete it and walk away from it and we come back to branches you'll notice there's no more Alex branch and I deleted it locally so we've totally lost that branch entirely and it doesn't exist anymore and if we come here and say git branch let me say git branch or get check out Alex doesn't exist so we've totally lost that branch so just be careful that when you are deleting these branches you make sure that you really want to delete them before you do that all right let's go and create a new branch again where I say git checkout - be Alex branch already exists well so what we have to do is now you're going to say well no I thought we just deleted the branch right we deleted the branch at local we deleted the branch on master you know what the heck why why is it saying it it already exists well changes have been made to the server that the the local isn't aware of so how do we how do we tell the local - hey get all the changes from from the server well the same way that we said git push to push our changes we're gonna say git pull to pull our changes down okay so when you say it gets let's say git branch or say git checkout master let's say git branch deletes let's I'm just gonna clean up and we're gonna start over okay so we're gonna say get branch alright we're gonna say git pull and so now what we're doing is we're pulling everything and it's gonna say okay we are already up to date it's like okay cool well let's say you have let's go and create a branch I'm going to demonstrate another situation where this might be useful so i'ma say git add or actually sorry let me say git checkout - be Alex alright now we create a new branch I'm gonna say it gets let's try to push our branch oh it's gonna say oh you gotta set this so imma say bush remember this is our first time using this branch so we got a type of this command alright so now that branch is back on our server so once this finishes up we're going to refresh we have that branch cool let's go ahead and create another branch I'm going to say git checkout - B I'm gonna say Matt's gonna say push oh we got remember the first time pushing to any new branch we have to type this command every single time just for that first time on a new branch msai gets pushed set upstream origin Matz again as you work with git you'll start to understand what this means a little bit more but for now you don't necessarily need to totally understand it alright so it looks like it finishes up if we go ahead and refresh the page you can see that we have two branches Alex and Matt and they are identical copies of a branch so if we want it to where in Matt branch so if I say git branch you can see that we're in Matt's branch we're gonna come to game maker we're gonna reload it let's go and make some changes let's say I create a script STR do stuff - let's say mess that's script and I'm going to come back to a command line we're gonna say git add - - all git commits Matt's scripts git push okay so we've pushed our changes to the server now the server is aware of it so if we go back to github and we're refresh oh you're gonna see there's a little one here and there's a little zero here it's kind of hard to see on the video hmm excuse me but those little icons there is to show how many commits there ahead of each other and which ones are behind and all that stuff so if we click on Matt's we can see we go to scripts and we can see though oh there's Matt's script and if we come to Alex's we can just go to scripts that script doesn't exist so we've done this before but remember keep in mind that we're still inside of Matt's so if I say get checkout gosh be let's say Aaron when I get say git push set upstream origin Aaron all right so now we've just pushed a new branch so if I come back to our github repository we check branches we have four branches we have master we have Aaron we have Matt we have Alex but one thing you'll notice is aaron has a one next to it the same way as Matt's so what's happened because we created a new branch from Matt's branch which had changes in it Aaron's branch inherited all of those changes from it so now Aaron's branch is the same as Matt's branch because we created Aaron's branch from Matt's branch but if we go and we say git checkout Alex and then we say git checkout - B let's say Marshall and we say git push set upstream or gin Marshall and we refresh this now we have a new branch and you'll notice that Marshalls has zeros next to it the same way that Alex's so Marshalls branch and Alex's branch are the same because Marshalls branch was created from Alex's branch and Aaron's branch and Matt's branch are the same is because Aaron's branch was created from Matt's branch so whichever branch you're in when you create a new branch will inherit all of those changes from it and send all of those changes down to its child branch okay so I think that's everything we really need to know about branching and setting up all that stuff I think we are good to go on there the last thing that we want to go over is dealing with merge conflicts how to revert to per branches to previous commits and how to recover some lost resources in some bizarre situations where you lose those resources okay so what is merging like what does it mean to merge branches together and like how what's the point of it what do we have to do it for and you know how do we do it okay so let's say you have a couple different branches so let's say we want to merge Alex's and Matt's branch together to get them up to date right let's say that you know matt has one change in it that alex's branch doesn't have to and you know let's say I've been making a ton of changes to my branch and someone else has been making a ton of changes to their branch and we want to send those changes up together so now that they're synchronized and and up and you know in sync with each other so what we're gonna do is we're gonna be doing a merge okay so what that means is it's gonna be just bringing the two branches together so how do we do a merge so what we're gonna do is we're gonna say or say git branch all right we're in Marshall's branch so let's say checkout Alex get branch okay we're in Alex's branch right now and we realize that all right matt has one extra change than Alex so we need to merge those together well it's my branch I'm Alex and this is my branch so I want to merge Matt's changes into my branch so I'm gonna say I'm gonna say git checkout Matt and I'm gonna say get pulled and what this is gonna do is this is going to get all of the changes that matt has made that are in the server that aren't on my local version so right now you'll say it's already up to date and that's because we don't have another computer like if I pulled out another computer and then I made a bunch of changes to Matt's and then I pushed it and did all that stuff and I you know I did the get get at all and get commit and get pushed and I did all that and then I tried to do that I tried to get those changes on this computer I would have to pull those changes down so anytime you want to get changes that you don't have from a server you need to use git pull and that will get all of those changes and pull them down the same way that we push up changes instead we're gonna pull those changes down so I've checked out Matt's branch I've pulled all of those changes now what do I need to do well I'm gonna go get checkout Alex I'm gonna check out back to Alex so I went to Matt's and I said hey let's get all the changes from Matt now I'm gonna go back to Alex and I'm gonna say git merge Oh Marge well let's type and get help first and if you notice merge it says join two or more development histories together so we're gonna be merging those together so I'm gonna say get branch and I'm gonna say it's just to make sure that I'm in the right branch I mean alex is I'm gonna say git merge Matt and since I'm in Alex's branch when I say get merge that's going to take take all of Matt's changes and merge them into my branch so I'm gonna hit enter and you're gonna see all of these little things you can see how these pluses these minuses that just means you know these files have been added these files have been removed these files have been changed and you can see all this stuff but really none of this matters there's no errors so we're good to go so now if I come back to my game maker and I hit reload you're gonna see that Matt's script exists inside of Alex's branch so if I say git branch again you'll see that we're inside of Alex's branch but Matt's script exists inside of Alex's management and if I come back to github and I refresh you'll see oh why is it not show that these are the same this still says zero Matt says one Erin says one Marshall says zero well even though we've merged we haven't pushed these changes we got to push these changes back up to github the same way that we say get at all and get commit well after we do a merge we need to push because that is doing emerges essentially the same thing as doing a commit we've taken all of these changes and we're we're committing them we're getting them ready to send up to the server we just did emerge we're getting it ready to send up to the server so we're gonna say git push and what this is gonna do is this is going to push the merge that we just did up to the server now the reason this extra step is here is let's say you have an issue trying to merge let's say you're trying to merge and then you get a bunch of errors and conflicts and things are not working then you can cancel that and you haven't totally just ruined your repository you haven't ruined that file you can just stash all those changes and get rid of them and say oh just kidding I don't want to do this merge right now and you haven't totally ruined everything so having that extra step in there it's just an extra layer of security to make sure that you don't totally mess up everything so if we come back to get hub and refresh now you can see that Matt Alex and Aaron are all up to date and they all have the same changes this this met the Sun workflow of merging branches can work in any direction I can make changes in Alex's branch and merge them into Matt I can make changes in Matt's branch and merge them into Alex ideally you would have your own branch and you would be responsible for your own branch so you would only ever be working and making changes in your branch and it's okay to create duplicates of your branch like there's plenty of times that I say you know get check out Alex get check out - be Alex backup you know like oh maybe I'm maybe I'm making some changes or something's not working and I just need a secondary branch so I can work with that without ruining it you know so I can definitely I can definitely do that right so this is okay this is acceptable to do but it's just just common etiquette not to work in somebody else's branch because you don't want to mess up someone else's branch and then they try to do something they're like what the hell my branch is broken I can't do anything all right so that's merging and that's a very simple merge right there were no issues everything went seamless how what is what emerged conflicts and you've probably heard me say that at the bunch and if you've heard other people talk about git or source control you've heard about conflicts and this is this terrifying thing of what is a conflict and what does that mean so let's say that you're working on two files at the same time let's say you're working on this script at the same time and let's say Alex comes in here and he says you know I want to make some changes I want to say some changes here changes here on line 13 okay and let's say there's a bunch of COBOL this code right you have all this stuff here and then let's say matt comes in and he says i also want to make changes so some changes here on line 13 let's let's be a little more explicit shall we some changes here in SC are Matt's script on line 13 Alex's branch okay now let's say Matt also was working on the same script on his branch he says some changes here in sassy are Matt's script on line 13 on Matt's branch okay so what happens is you have two people making changes to the same lines of the same files on two different branches when you go to merge them github is not going to know which change to take because what happens is normally one person is working on on some files and another person is working on other files so when you merge those there's no conflict because no two people were working on the same files at the same time but what happens is if two people are github freaks out and it says hey I can't handle this you the developer somebody needs to tell me which files that I should accept and which ones I should take and this is what's known as a merge conflict it's where two people work on the same thing at the same time now two people can work on the same script at the same time as long as they don't write on the same lines so Jen like and that's really hard to coordinate so generally it's just best to have two people work on two completely different features like hey I'm gonna work on this enemy today and tomorrow what are you working on it's like oh I'm working on the main menu and I'm working on some UI elements and doing this over here it's like okay cool I'm working out an enemy you're working on a menu there's gonna never be any overlap we don't have to worry about any sort of conflict that's easier said than done because sometimes you have to make little changes here and little changes there and if you're both doing that then it's inevitable that you will eventually have merge conflicts and it's where two people just try to edit the same file at the same time on the same area and github freaks out so let's simulate that and let's show how to handle that and what that looks like so here we are let's go and check what branch are we in I'm gonna say git branch I mean Alex's backup we don't really care about that so let's say check out Alex branch - deletes Alex backup we don't really care about that branch anymore alright so we've deleted that branch and we're in alex's branch okay so let's go ahead and reload this okay so we have game maker up we're in Matt's script let's go ahead and actually do something let's go ahead and just create a merge conflict so I'm gonna say you know in line one I want to say show message hello from Alex's branch alright and I'm gonna hit save this I'm gonna commit this and push it up so I'm gonna say git add bash - all get commits - em Alex's hello message let's say git push and now we've pushed these changes to the server okay nice and simple let's go ahead and check out Matt's branch now so let's say that you know I was working on that and you know I I made some changes to that script and Matt at the same time just happened to be making changes to that script - so I'm at script he's gonna say show message hello from Matt's script or Matt's branch I should say okay so I'm gonna do the same thing I'm gonna push this up I'm gonna say get at all good commit it's um Matt's hello message all right and I'm gonna say push these changes up okay so now we have two branches we have Alex's branch with one change and Matt's branch with the other change let's try to merge those branches together so I'm gonna say get check out Alex I'm going to say it gets so I mean Alex's branch but I need to check out Matt's branch first and you say git pull because I need to get all the changes from Matt's branch okay we have all the changes I'm gonna check out back to Alex's branch and I'm going to say git merge Matt's so now I'm going to try to merge Matt's branch into Alex's branch and you'll see automatic merge failed conflict Oh fix conflicts and then commit the results so how do we how do we do this well this is where we're gonna use our GUI UI interface tool that we download it because managing merge conflicts with some sort of tool that isn't a bunch of text is really helpful so let's go ahead and open up visual studio code and let's go ahead and open up our folder that we're gonna work with so I'm gonna hit open folder I'm gonna move to our desktop and I'm gonna open up our git project so I'm gonna say select folder and here we are we're just in a normal text editor if I wanted to I could open up a script I could see you know hey look this looks like all of our game maker stuff I could work on game maker files in here I could you know make changes and do all that stuff but I'm not gonna do that because we don't really care about that but you will notice this weird little branchy thingy over here that has a 1 and this is our source control and so here you can see that we have some stuff showing up in our source control and you'll see merge changes like ok well let's go ahead and click on this and you'll also notice I'm gonna bring this window up if I look in the bottom left you'll see Alex that's the branch where and we're in Alex's branch so this text editor is fully aware of everything that we've done and we could actually do everything that we've been doing by typing commands you know the git commit em and get a doll and get push we could actually do all of that through here if we want it to but I wanted to do the commands because I think it's very valuable to learn how to do those commands early on rather than just learn just the UI because knowing both is very very useful so I will show how we can do some of the UI stuff of the stuff we've done already but for now we're just going to use the UI to manage our merge conflict okay so we're in Alex's branch and we'll notice we have this thing sitting here what is this well if we click on it you'll notice that we have this weird this is weird message what's going on here you can see that we have current change here and we see incoming change and you'll say Matt's incoming change and our current change so remember we're trying to merge Matt Matt's branch into Alex's so Matt's changes are the incoming changes they're coming into our branch and we see that our current changes are well hey look at this hello from Alex's branch and hello from Matt's branch well both of them were edited on the separate branches and github doesn't know which branch that it should take so we need to come in here and say which change is actually the important one now this can be tricky because if you don't understand all the code this is very easy to break the code right here so this this really requires an understanding of whose changes are actually more important sometimes you might notice it might just be a really small change like a variable name difference or something different so you can come in here and manually handle that but you also might notice it's a big block of code that is coming in you're like oh I don't know if I should take this so this is gonna be really important that you communicate with your team members understand which code is more important and when you're ready to decide which one you can come in here and you can click one of these options you can accept both which you might want to do that you might want to say ah we want both these changes you can say accept current or you can say accept incoming in this situation I'm going to say okay Matt is actually the one that should have been making the changes Matt's change are better I shouldn't have been editing that so we're gonna accept Matt's changes so we know Matt's change is the incoming change hello from Matt's branch I'm gonna hit accept incoming changes so that what we've done if we we've told git and we said okay we actually want this change for this conflict so I'm gonna hit ctrl s to save and now we've solidified the the conflict so if we open up our terminal again we could say gits - - all say git commits resolved merge conflicts and we could say git to push and now we've accepted all the changes we've resolved the merge conflict and we've pushed all those changes up so now if we take a look at the code inside of Alex's branch and we come to scripts I'm to Matt's script it'll say hello from Matt's branch and that's because we accepted Matt's changes into our Alex's branch okay so that is a very very very simple merge conflict that was a very easy one there's infinite number of scenarios where this will come up at this point the only way to prepare and - to know how to handle that is to have an understanding of your code and which ones are more important so when you have conflicts like that and it's just two differing sets of code that you have to decide between that's gonna be entirely up to you and there's nothing I can say or do to prepare you for that you just have to understand the code and understand whose is more important and who should be there in that situation but GameMaker has a few edge cases that are kind of weird and bizarre to handle and deal with right now in yeah we're gonna go over how to handle those merge conflicts right now okay so let's say you're working on some so this is kind of hard to explain but I'm gonna try my best so if you don't know if you open up your game maker file you know this get test get project has a little gaming icon if I go ahead and say open with Visual Studio code let's this is what our GameMaker file looks like it's the dot yyp file and if we look through this is a very simple project so there's not a whole lot of stuff in here but you'll notice that it's just a bunch of just a bunch of kind of gibberish right like this is not like normal code that's really easy to read there's a lot of stuff in here that doesn't make sense but the reason this is important because this is all just text so all of the changes that you make in your GameMaker file get converted to text changes that come into this yyp file and when you do your git commits and your merges and your pushes you're doing all of those changes just the same way that you would do any of your other changes so sometimes you get merged conflicts in this file and it suddenly becomes really confusing because you don't know which changes you should be accepting and which ones you shouldn't be accepting because how do you understand this well I'm going to show you a little bit of some tips and tricks on how to understand a little bit of what's going on here and how to understand which changes you should be accepting when you get a merge conflict in one of these one of these kind of configuration files or whatever you want to call it so let's go ahead and set up a scenario so what what is this file for well this file here is for managing resources and all of the room data and you know you'll notice like let's let's take a look at something let's see if we can find an example you'll notice that this right here is an OP is some sort of object inserted into this file and if we look at resource type down here you can see that it's a GM script and if you look at resource path you can see that this is mat script so this right here represents mat script in game maker so if I were to delete this right now and save it and reload the project mat script would suddenly have disappeared because game maker isn't aware of where mat script is this is kind of like the master file that kind of shows game maker hey here's where this file is here's where that file is so you can see that you know this script right here is representative of mat script and this object right here this GM object is representative that obj object I created earlier and then you can start to see okay well there's things like folders so I'm guessing that's folders in this project in game maker you know we can have folders we can create folders inside of our script we can say script group so if we save this and we come back to this yyp file you know we can scroll down to here and we can see oh look at this you know this is some changes right here this green represents that there's some changes here okay CGM folder but we don't really know what it's called and this is this is kind of where it gets really confusing because this points to another dot YY file which then has more of this information so if we open up this YY file that we just added you can see that okay it has a bunch of information as an ID it has a type and then you can see oh my script group that's the name of the folder so all of this stuff is kind of working behind the scenes for game maker to understand where things exist where they're located in the resource tree what type of resource it is and all of this different stuff but when you get conflicts with this type of stuff it can be very overwhelming to know like which items do I take which ones are more important what even are some of the objects that are conflicting and so we're gonna go over how to do that right now okay the most problematic place that I see this actually happen the most is rooms surprisingly enough as rooms throw a lot of issues with this for some reason so we're gonna go and create some rooms and I'm gonna demonstrate what that looks like to have a bunch of different conflicts going on so let's go ahead and stash all our changes because we don't care stash those we're gonna say git branch what branch are we in we're in Alex's cool let's work in Alex's branch for a second it will probably have to reload this we love this let's go and create a room rename this we say room Alex's room alright so let's go and open up Alex's room let's create some objects say obj Alex's object and in Alex's room we're gonna go ahead and put Alex's object okay so you know some basic stuff you created a room you put some objects in there and you you made some changes nothing too crazy right so let's go ahead and save this and let's go ahead and commit it so we're gonna say it's add - - all get commits Alex's room and Alex's objects take it push alright so now we've made all these changes let's go ahead and get checkout mats branch and let's pretend that mat is also making changes right so Matt hasn't merged in Alex's changes so he doesn't know that I made a change to the rooms and all this stuff so he's gonna come in here creates another room he's gonna say room name room Matt's room - and maybe he wants Matt's room - to come here and all of that stuff and let's say I'm gonna rename room 0 to room 0 Matt and I'm gonna save all this and I'm gonna commit it as it gets - - all get commit em some new rooms say get push and you know what let's make one more change to Alex's to Alex's branch just to make sure we get a nice solid conflict so I'm gonna say get check out Alex I was going to reload this and notice how I renamed room zero to room zero Matt let's go ahead and make this extra juicy and rename this to room zero Alex so we've both edited the same room and gave new names to it we changed the order of the rooms in this folder structure and we also both created some new rooms now creating new rooms probably won't conflict but we will get a conflict with this room zero changing it to name Alex and changing it to name Matt and let's go ahead and commit all of these surface a git add - - all commits - em Alex's room zero changes let's get push alright so I hope we have enough changes that we've made that really conflict but this is actually more common than you think because if you guys are both working in a room and trying to move objects around you'll see that there's gonna be issues and we'll simulate that in just a second okay so we're in Alex's branch boots or Chuck branch and then we're to say get to check out Matt's branch or say git pull to get all the changes from Mass branch when I say get checkout back to Alex's branch we're gonna say git merge Matt's oh and we have some conflicts alright sweet that's what we were trying to create for this example normally you never want conflicts but in this situation we're trying to create them so let's go and open up visual studio code and let's take a look at this branch here and you can see look at all these merge changes that are sitting here so staged changes mean that they're good to go those changes were made there are no issues and if you notice Matt's room being added Matt's room to being added when issues but you'll notice that we have oh you know delete it both people both tried to delete this room we added this room and then Matt out of that room and there's there's a bunch of conflict so how do we how do we resolve these these are not typical code changes that we can just look at and understand so let's go ahead and let's double click on our yyp file and let's take a look at where the issues are so here you can see that okay well we have these key value changes in here and we have you know this wants to set this wants to set this to an object and this one wants to set this to a room so what's happening well we have Alex's object and we have Matt's room that are trying to make changes to the same area of the yyp file and this is hard because now we don't know which one do we take which one is more important you know you might say okay well Matt was supposed to be working on the room so we're gonna take Matt's changes and we're gonna ignore Alex's changes but in this situation there's actually an object in a room that are conflicting so I think we actually want both changes in here because we want to keep the room changes and we want to keep the object changes so we're gonna sit accept both changes now you'll notice we totally ruined the structure of this because this is not how this is structured so we need to do some saving we're gonna come in here we're gonna close off this brace and when it curls off this brace we're gonna put a comma we're going to open up this brace and we've successfully saved the structure of it we need to make sure this is up otherwise we'll get corrupted files and GameMaker will not load so this is why I mean that this stuff is really tricky and there's only so much you can do to prepare for this but I'm going to just kind of explain kind of what's going on here and some of the stuff that you can look out for that might help explain it so I'm gonna hit save I'm gonna hit this little plus button it's staged changes oh there's there's still conflicts in here so let's let's see if we can find the other conflicts oh there's more conflicts down here so if we come down here we can see oh look it tried to name this room 0 Alex in this room 0 Matt so this is a situation where we can't accept both because we're trying to change the name of one room on two different branches it's the same thing as trying to change the same line of code on a normal script or object or something on two different branches so we have to accept one of them if we accept both of them that wouldn't make sense it rune can't have two names room can only have one name so which name should be right well let's say in this situation I was the one that was right and it's actually supposed to be named zero Alex so I'm gonna accept current change and that's good to go I'm hit ctrl s and it looks like all of our merge conflicts are saved so I'm gonna hit this plus button and that succeeded let's go on to the next merge conflict let's open up this one oh this room was deleted okay well there's not really much we can do let's go ahead and open up this file oh come on open these up alright so let's look at our conflicts what is this this is room 0 Alex dot YY so this is the YY file of the resource itself like I showed earlier there's the yyp file and then that points to a bunch of different YY files and then those YY files are the configuration files from the objects the scripts the sprites the rooms everything anything that's in our resource tree as these files that are associated to it so what we're gonna do is what we need to look at this if we look at both of these changes it's basically I kind of know what its gonna say because we made the change we changed the name in both of them and it's gonna say ok well your tried to change the YY file both of these and change the name you can't have again two names so what's change are we going to accept well we want to accept the same change that we accepted in our yyp file which was Alex's name is actually supposed to be correct so in this room I'm gonna say accept current change I'm gonna save this and in this one I'm gonna say accept current change and I'm gonna save this and now we can go ahead and well there's still conflict so let's see if we can find where the conflicts are it doesn't look like there's issues it looks fine alright so it's saying that there's merge conflicts but I don't see any so I'm gonna hope that there's not another nice they commit those anyway and I'm gonna come in here and I'm gonna try to I'm gonna try to stage that one oh it says there's some but I don't see any conflicts I mean I can look through here and and there's no nothing in here that looks like it's conflicting anywhere usually Visual Studio codes really good at drawing your attention to things that are conflicting so I'm gonna assume that's something weird because that's just what happens and miss it yes and the last thing that we have to do it let's go and open this file this one was deleted so we're gonna save that one and the last one we're gonna do is we're open up this file and here you can notice ok well what is this what is this file this is some gibberish dot why why file what does that even mean and what you can see is if you look up here you can see that this is a folder this is actually a folder file that we're working in and if we look down here localized folder name is resource tree rooms so this is our rooms folder right here so this is gonna want to reload we're gonna ignore that for now this is our rooms folder and so what's happened is we change the order of the rooms in two different branches so you'll notice that if we look at this branch Alexes branch there's only two rooms each gooood represents a room so there's only two rooms and they're in this order but if we look at Matt's branch there's three rooms and they're in this order so there's actually issues here where it's trying to adjust the order of the rooms and because it does that through these string representations we have to choose which one we're going to accept well again we're gonna say that Alex was the one that was supposed to be editing the rooms in that situation and so we're gonna say accept the current change we're gonna save it and we're gonna we're gonna get it ready to security commit and and then we're gonna come back to our command line and we're gonna say well maybe we don't want to push right because this was kind of sketchy where there's some stuff in here that we didn't totally understand what was going on and so we're not entirely sure if we did our merge click correctly so let's not push it let's instead let's make sure that everything works properly so we're gonna reload and we're gonna see okay we have room zero zero zero Alex that's correct because we wanted Alex we have room Alex's room room Matt's room and Matt's room too it looks it looks like it's okay it's hard to say because we did a lot of weird stuff here but it looks like it's okay now again as you have more objects in your rooms and you have more rooms and more stuff going on it's a little bit easier to see when you just totally destroy something and ruin it since we have just some blank black rooms it's it's really kind of hard to know if we did it correctly or not but I I think we did an okay job it's not entirely it's not entirely sure I'm still a little little iffy and and you can see that like it's already trying to it's already trying to put more changes and do all this stuff doing github with game maker and this type of stuff is crazy and can get overwhelming and it's just kind of hard to deal with so I really recommend that you tried avoid this as much as possible and you try to you try to communicate with your team members as much as possible to avoid these types of merge conflicts but they are inevitable they will happen let's go ahead and demonstrate one more example of this you know I'm gonna I'm gonna do something I would say sprite my spray I'm gonna say sprite my sprite - alright so we've created a new sprite let's go ahead and push that up stories I get a tall get commits - m-my sis right - just take it push okay so let's say get checkout mats and we're gonna merge we're gonna merge my changes into that so I'm going to say we're in mats branch we're gonna say get merged Alex hope there's conflicts so it looks like it's probably it's probably still got some of our conflicts the previous the previous issue we didn't we didn't we didn't commit those up and we didn't resolve those so I shouldn't have stashed those I should have I should have actually pushed all those up and merged those let's go ahead and resolve those merge conflicts here and let's let's actually push it up this time okay so let's go ahead and say get at all get commits resolved merge conflict get push okay so now we're here and we have successfully merged in Alex's branch so let's go ahead and reload this and we fixed all the room issues oh no we got an issue where it's trying to load a resource that doesn't exist and if we come here to rooms we can see that Alex's room doesn't exist so oh man we got down a rabbit hole and I'd ruined it alright so what's happening well there's there's a lot of stuff that's broken and we realized that we did a bad commit all right so let's go ahead and walk through this because I wanted to show this anyway so let's say you've totally butchered a commit sorry you've totally butchered a merge and you just don't know how to recover it and you're just like oh my gosh I've ruined everything and there's files not showing up and you've just lost everything all right how do we recover that all right let's let's do that right now because this is something that's happened and I've had to do it several times and it's not fun so you likely have everything backed up and you have a little snapshot of each project in each state so let's say over in Matt's branch right now and the branch is just totally messed up all right so we come to branches we know Matt's see that we updated one minute ago and we tried to do resolve the merge conflict but we didn't resolve it properly there's some issues with that so what we need to do is we're gonna say okay well this is totally messed up we need to resolve we need to like revert the branch to a stable point because we pushed up all the stuff and we weren't we weren't supposed to do that so this is the last merge conflict we did that we successfully did and then all of these Alex's rooms all this stuff this is all part of this merge conflict that was totally busted so let's say we want to revert our branch back to this version of the merge conflict or of of the branch this is when the branch was stable we resolved that last merge conflict with no issues all right so here's what we're gonna do if you come over here and you see this little little this little thing here this is some code value what we're gonna do is we're going to copy this and this is basically just a unique identifier that represents this branch so let's go ahead and copy this and we're gonna come back to our branch and we're gonna say it's branch - be checkout and we're gonna say Matt recover is we're gonna create a new branch that we're gonna call Matt recover and we're gonna say control V so normally if we created a branch we would just we would have oh no I messed it up sorry this normally if we were to create a new branch we would just type this but we won't don't want to create a new branch from the current state of Matt's branch that we're in we want to create a recovered version of Matt's branch from that specific commit here which we copied this hash code for still gonna say git branch - B check out Matt recovery we're going to paste it in and we're say enter Oh I said get branch - beet it's not supposed to be that I'm sorry I say get check out - B Matt recover and there we go oh so we have some changes in here that we didn't commit so we're gonna say get stash we're gonna get rid of all those and then we're gonna we're gonna create the new branch okay so we've created the new branch and we're gonna say it push set upstream origin Matt recover all right so if we go to github and we refresh on our branches you can see that we have a new branch called git recover and if you notice this has the number 4 by it and matt has the number 9 so that means matt has five more commits on this branch than matt recovery does which only has four commits so we've successfully created a new branch that is a copy of a stable working version of the branch so now we can do a couple different things we can delete these old branches and we can just say you know what we totally lost it we're just gonna create a new branch there are commands that allow you to revert the state of a branch back to a commit without having to create a new branch but again I like to create a new branch because I feel a little bit safer knowing that I've successfully cloned a clean version of it and that I don't I'm not trying to like I'm not trying to repair a broken branch I'm trying to I just created a new branch that's a clean version of it some people would disagree with that and say that's not the right way to do it and that you should revert it personal preference if you want to look into it just check out get revert commands and it'll explain how you can do different things like that but for now since we know how to checkout and create new branches we're just gonna build off that knowledge and we're gonna create a new branch that we just called Matt recover okay and Alex's branch is also probably totally butchered because we tried to merge some stuff there so maybe we should just create a version of Alex's branch that's and now if we come back to github again we will see and we come back to our branches we have a new branch called Alex recover and Matt recover and they both are on the same same state so we've created new branches that are stable versions of our branches that we totally corrupted we totally messed up earlier so let's go ahead and do one more merge conflict this time let's do it properly and let's show this is why it's very important there's communication on who's working on what otherwise some of these merge conflicts are so complex that it's almost impossible to resolve and I've had to just there are times that I've had to take 3-4 hours worth of code and I had to just all right I'm gonna put this in this old branch I'm gonna check out a recover branch and then I'm an emerge in Matt's changes and then I'm gonna manually retype all of my changes that I did for like three hours if I'm gonna manually copy and paste all those changes in it's not fun it's not glamorous it sucks but sometimes you have to do it because there are sometimes just issues like this so it's best to do a lot of commits a lot of merges as much as possible and a lot of communication so that you can minimize the impact that some of these issues will have on your system so let's do one more merge conflict let's do it right this time and let's save ourselves so we're gonna do something a little bit simpler let's say we both decided to edit the name of this sprite so I'm gonna say SP are my sprite and we are in Alex right what branch we in git branch we're in Alex recover that's gonna be the one we're gonna work from from now on so we're gonna say SP are my sprite Alex let's go ahead and say git add all git commit and renamed my sprite so get push all right let's get let's get checkout mats recover and let's go ahead and reload our project and I'm gonna rename the same sprite - I'm gonna say oh we both wanted to rename this sprite miss a sprite my sprite mat let's go ahead and get add it commit your name's nice right let me say it's bush alright so now both of them have made changes to the same sprite object so I'm gonna say get to check out Alex recover I'm gonna say git merge match recover OH again the conflict because both branches tried to change the name of the sprite at the same time so let's go and open up visual studio code which is gonna handle all this and we have a lot of stuff going on here what's going on so it deleted sprite my sprite but then it created sprite my sprite Alex and it created sprite my sprite Matt and then there's a bunch of other changes here so let's go ahead and close all of these and take a look at these one by one so I'm gonna save this yyp file for last let's go ahead and open up I know what's this one right here that's the sprite may notice look at there's no there's nothing here it's an empty sprite but if we had done some artwork we would see some sprite and again if we open this up so that's the actual sprite art itself so it's like it's saying hey you tried to change the name and it's trying to create it as a new sprite resource but then there's the artwork everything there's there's so much stuff going on here so and if we look at this this one's deleted so what we can figure out just by looking at this is that sprites SP are my sprite layers and it has some identifiers so my sprite has some sort of layer and it looks like these all start with the width 4 to 0 a 1 something right and so each my sprite as an Associated layer so you can see espero my sprite Alex has this one which is SP are my sprite Alex and this one my sprite matt has this one so these two go together and these two go together and you'll notice that oh this one here what is this one oh this is the sprite data so this these 3 go together these 3 go together and these 3 go together and these 3 went together but since we renamed it game maker deleted it and created it as a new resource behind-the-scenes okay so we're starting to learn a little bit how game maker handles the resources and manages all that stuff there's a lot of stuff going on here so what we didn't want to delete it because we did rename it so we're gonna go ahead and add all of these up so it's gonna say yes let's go ahead and add all of these up yes and I'm gonna add this one up yes okay so we did delete it we definitely wanted to do that but now we need to decide which one of these is correct well let's say that Alex's are correct again this time let's go ahead and take this change but before we do that we might need to know what the names of these are to associate them to the yyp file so let's go and open up this yyp file and let's take a look of where our merge conflict is in this file okay here it is sure enough in the GM sprites resource tree it's trying to give this resource path two different names my sprite mat and my sprite Alex so we're gonna accept current change because that's them my sprite Alex I'm gonna hit save okay so now we've done that and we can go ahead and save this so if we go ahead and save this and we add this up we've successfully added that one in with no issues now we need to decide which three of these are we going to keep well if we open up this we definitely want to keep that if we open up this oh we noticed there's some issues here so let's accept current change because we want Alex's let's go ahead and push that up oh there's still some issues oh it still thinks there's issues it always thinks there's issues I'm going to open this up and we noticed that all of these are just associated to each of these so I'm gonna go ahead and take all three of these and I'm gonna commit I'm going to commit all three of them and now there's all three of these which are also conflicting but we're gonna say that these are all part of that other one and we're gonna we're also going to accept this aren't change so let's go ahead and push all of these alright we're gonna say well yeah we got all of these ready to go let's go ahead and try to commit this merge get commit - oh so let's say get add Oh get commit merged Matt's into Alex don't get push so again we didn't have to push I probably shouldn't have pushed there because pushing again sends it to the server I could have committed it all I could have merged it and then I should have checked that it worked first before I pushed it all but I got eager and I wanted to push it so now if something breaks I'm gonna have to recheck out branches and do all that stuff and and try to save it all again so here you can see sprite my Alex's my sprite alex is the one that's here so let's go ahead and we pushed all that let's go and check out Matt's branch and let's go ahead and merge Alex recover and we were able to merge with no conflicts and that's because we resolved all the conflicts when we merged Matt's into Alex's and then we got that into a stable point so then when we try to merge Alex's into maths we had already resolved the ball the merge conflicts so it was able to just merge nice and seamlessly without any issues so I think that's everything I want to cover for the merge conflict again there's only so much I can show about this and a lot of it is going to be just experience but I can hopefully try to share that like just look for little clues into like what it is that it's saying there's there is a lot of important information here and if you just kind of look at the information you can kind of start to figure out what other merge conflicts it's like oh well we both change the order of the rooms so it just it doesn't like that so it needs to say which order of the rooms is the most important one if you both edit contents in a room it will show you that like for example if we both edit this room gonna reload if we both edit this room like if there's objects and stuff when we both edit this room then it will there will be a merge conflict with that and both objects Whittle trying to say like okay you both tried to edit the contents of this room only one of you can accept those contents and again you will see that the same way that we edited the sprite there is a file like this for each room and it contains all the position data and all the scaling data of every object so when you try to move it it translates those positional and room data all of that into text and then saves that in these YY files that then get converted can to the gate conflicts like there's so much stuff going on but hopefully this all was a nice introduction to showing how to do that and then as you just get more experience with it you'll start to figure it out but I think that's pretty much it the only thing I will show is how to use this UI interface to do all of your commits and pushing and do all of that stuff if you want it to do that okay so the last thing we're gonna do real quick is we're going to show how to use this Visual Studio code interface to do all of our commits pushes and all that stuff in case you want to use this instead of command line because some people like it a little bit better so let's say we're in game maker and we want to make some changes so let's say scripts let's create a new script where it's a script GUI interface script and we're gonna say whatever okay cool so we've made all of our changes if we come to Visual Studio code the same way we do normally you can see which branch were in and we can actually change our branches and do everything right here but first let's take a look at some of our changes you see that we have all these here and you see that we have this year we have this year now you could go through here and you could try to parse everything but if you were using the command line you would normally just say get add all right and sometimes that's just what you want to do so instead of trying to understand everything that goes on behind the scenes whenever you change a file you can just come right up here to this changes and instead of hitting this little plus button next to each of them individually you can just hit this plus button next to everything and it's gonna stage all of them so this is the same thing as saying get add off we just added everything and they're now staged and ready for commit so next command we would normally type would say git commit dash M and then we would type a message so let's just go ahead and type a message here created new GUI interface script and now instead of hitting Enter we're just going to hit this check mark right here and so now what we've done is by hitting this check mark right here we took all of our stage two commits and we committed them so now we've committed so we just did it add all and we just did get commit - M in our message and now we would normally push up so we can hit this little button right here and we can say push and now we have just pushed to our branch called mat recover all right nice so we just did all of that with the interface and we didn't have to type really much at all if we wanted to change a branch we could come down here and we could click on the branch that we want to change to so let's say I want to change the Erin's branch let's give it a second now it's switched over and so now if I went back to game maker this is the same thing as saying get checkout Erin instead we just did it with the interface and if we wanted to we could merge we could do anything that we wanted to that we would with the command line with the GUI interface here so that's pretty much it I just want to show how to do this again I like to do a lot of it with the command line and then just resolve the merge conflicts with Visual Studio code but some people like the GUI interface for everything and if you enjoy it that's totally up to you I just think it's really valuable to know how to type the commands and understand how that works because this means now that on any computer that you're on you know how to do you can do get operations without having to install an external tool whereas if you only know the GUI interface and you're in a situation where you can't install a tool and you're stuck with just this command line you're gonna have to look up everything and relearn everything from scratch rather than just learning it from the beginning knowing how to do it forever so alright guys I think that is it for this tutorial wow this was long and this was a ton of information if you are confused I don't blame you this is a very complex and there's so much information that just gets word vomited at you it took me a long time it took me about a year of just constant use and repetition to really fully understand a lot of this stuff and even still I don't totally understand everything so if you feel overwhelmed or lost don't worry it's totally natural you'll get used to it as you start to work on it more and it will start to make more sense the more you use it and as always if you have questions please leave them in the comments below shoot me a message on discord send me a message on Twitter comes hi and twitch if you're wondering what this weird pixel art stuff is on the bottom this is where normal ly little penguins run around on our twitch stream and we just hang out and work on totem and do dev together so thank you guys so much I hope you found this useful you did hit the like button hit subscribe share it with a friend and I will see you in the future with more videos hopefully soon but if not on Twitch where we're streaming more to five days a week all day I appreciate you for great rest today [Music]
Info
Channel: GentooGames
Views: 1,270
Rating: undefined out of 5
Keywords: gamemaker, how, to, make, create, program, code, shaun, spalding, shaunspalding, heartbeast, heart, beast, pixelatedpope, pixelated, pope, pixel, friendlycosmonaut, friendly, cosmonaut, game, gml, gms, tutorial, asset, maker, learn, studio, github, git, everything, need, know, source control, source, control, commands, terminal, visual, visual studio
Id: ya6FN96k5WY
Channel Id: undefined
Length: 108min 38sec (6518 seconds)
Published: Sat Mar 28 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.