Beginners guide to get started with GitHub and Godot!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome i'm your geek eric and today today we're going to walk through how to set up a github repo to go along with your new godot project let's get right to it so first up you need a github account you need godot installed and you need a get client on your computer so we'll walk through each of those as we get to it but first i'll let you go set up your github account if you don't have one already you could pause the video and come right back after you get it set up you need to go to your profile page and then in the top right you'll see this plus sign right here and we're going to make a new repository okay so i'm going to call this test repo and i'm going to leave it public but i'm going to delete it after making this video so you can choose now whether you want to have this publicly accessible or private some reasons to choose one or the other is public is better for showing off to recruiters or a company for an interview while private is better if you are willing to make a piece of closed source software like maybe a closed source game that you're wanting to charge money for okay so i'm not going to initialize a readme but that's something that you might want to do if this is going to be a open source project and you're expecting other people to follow a set of instructions on how to get the project set up but we're not going to do that for this video now here's here's a really important step that will save you a lot of trouble you want to come down to the get ignore file and we're going we're going to want to add the go dot git ignore and basically what this is going to do is there are some project files or binary files that are generated whenever the program opens up your project for the first time and you don't need to share that to everyone's computer that's working on the project for example you may have some binaries that are only compatible with your operating system for mine it would be linux i could be working with someone on a windows computer and they would have binaries completely different from me so we don't want to be pushing those back and forth so this gitignore file will just ignore certain files or folders that we specify now github is very nice and has a bunch of default get ignore files so there's there's some for godot unity and other other such things now you could choose a license i'm not going to choose one again this project's not going to stay up very long so i'm not worried about that and we're going to create through repository now that the repository has been created let's click on this clone button and let's copy the url right here now i'm going to open up my git client for this video which is going to be the github git client in the future i want to make a video showing you how to use the terminal azuregate client but that will be a more advanced video and if you have any ideas for things that you would like covered in a more advanced skip video please after watching this one drop them in the comments section down below while you're down there don't forget to subscribe and like let's get back to it so i'm going to minimize the web browser now we will need this later okay so i have my github desktop client you can get this by going to the github website and downloading it it's pretty simple and when you open it up for the first time you'll be prompted to log into your github account so one of the nice things about this is that it will have all the projects that you have access to in this your repository section so i'm going to click on the repository that i just made and i'm going to clone it so we actually didn't have to copy that url earlier i'm just used to that because i'm used to cloning it on the command line but hey this is easier now we want to make sure we put this in a place that's easy to find so what i like to do is i like to have a git folder in my home directory or in windows sometimes i put it inside the documents folder so i'm just going to choose the get folder here and then look at this again so home my username the git folder and then the name of the repository will be the folder inside the get folder clone this shouldn't take too long it's a it's basically an empty repository so well maybe my internet's been made i don't know okay so we have one commit that one commit is the get ignore file so what we're going to want to do first to get this set up is we want to open up the getignore file so i'm going to bring in my file folder i will navigate to where i cloned the repository and well now you're you might be looking at this and wonder well where is the getting or file now if you see that dot in front of the file name shows that the file is a hidden file now i'm going to hit control h that works for my operating system i believe that also works on windows mac is a little different but you can google how to show hidden files on mac if you're using that so now we're able to see the hidden files so let's open up the getting door and i'm going to add i'm going to add a folder called the builds folder now i like doing this because this way i can keep my builds inside my repo but i won't be pushing them to the server because if i ever want to generate a pass build i could just rebuild so i don't need to clutter and bloat my git repo with build files so what this is going to do is it's just going to ignore the build folder and everything inside of it when committing new files just to make it easy so don't forget to save and close out of the text editor now let's make our first commit so it's always good to have the commit name be somewhat relevant to what you actually did and if you're having a hard time coming up with a short title for what you did then you probably did too much and you should have committed a couple of times instead of one big commit the reason why that's important is because the more the more commits that you have there are more places that you have to roll back to in the event that a bug or [Music] a corrupted file shows up you have more chances to recover your data by rolling back to one of your previous commits so i'm going to title this simply add builds folder to git ignore super simple so we're going to make sure that we have this file change checked and we're going to commit to master master is the name of the default branch in github so now you may think that someone else on your repo could see your commit but you would you would be wrong so you committed your change to your local repository not github server so to push your change to the server you first have to commit it locally then we could see that we have one commit that we can push to origin or the server so we're going to push this to origin we push to the server now if you want to check it's super easy all you have to do is go back to your repo on github and reload the page and now you can see that we have two commits instead of one you can see that we added the builds folder to the get ignore file so at this point you may be wondering when we're actually going to get to the godot part of this tutorial so this is actually the easiest part so what we're going to do is we're going to open up the godot program now that you have your godot program opened let's go ahead and make a new project and we're going to call this test project and we're going to want to save this inside our repository folder and we're going we're going to make a folder inside of it for the project now you don't have to do this you can make the project folder the repository folder but i just like doing it this way because we could have that build folder in the root of the repository we can have a art binary folder and you could in that folder you could put stuff like your files and the critic files and your dot blend files because you don't want those files in godot because it doesn't know what to do with most of them but you might still want to track them using source control so you could put that in your root folder and share it around with your teammates so let's click create and edit that's a beautiful beautiful program how fast that opened but for this tutorial we really don't have anything to do in here so we're going to well we might come back to this so i'm just going to move this to my other monitor you can minimize it if you would like now you can see we have several changes but i don't like working that much in the master branch i like that being merged into when there's a really stable part of the game so you'll do some work you'll iron out some bugs and then you can merge that stable part into the master so if we shouldn't all just work in the master branch then what should we do okay well let's click on current branch right here and let's make a new branch let's call it develop and we're going to name new branch so we want to take the changes that we have that are not staged these are unstaged changes and we want to bring them to develop with us so we're going to click this so now what we really did is we just took and we initialized the godot project so i'm just gonna name the commit message [Applause] short sweet simple it works now let's commit this to develop now that's been committed let's push this branch to to the server so right now develop does not exist on github let's fix that okay so now let's think about what happens whenever we want to bring a outside person to work on our game with us so what if you're on a team well now that you have the repository set up you need to give your teammates access to it so let's go to the settings page now certain tabs in the settings page will require you to enter your password just to verify it's you because here you can do bad things like delete the whole repository so be careful so now we made it to the manage access tab we're going to invite a collaborator this will send an email to the collaborator and they will have to click yes on it saying they would like to join your repository within 24 hours i believe there's a time limit on it okay but like i said earlier we really don't want people working in the master branch okay so let's go to the branch tab next a new person to your project when they clone your repo will be on the default branch when they open up the repo so we want to change that to the develop branch so now we've got our new contributor we have our branch set up let's go back and try a couple things so now we're coming to the end of the video i would like to leave you with some helpful tips of how you should work in your repository with a team of two four and greater [Applause] i have my notes okay so two people should not work in the same binary file at the same time now what does that mean okay let's say you have a png or a scene file or basically anything that's not a human readable text document mostly your code so how do you get around this well let's say i need to work in the main scene and i'm building the level in there but melissa needs to work in the ui canvas an easy workaround is to make the ui canvas its own scene make it its own prefab in unity terms and that way melissa can work in that prefab and i can have the hud prefab in my main scene and i could work in the main scene and we won't have any conflicts now let's say that's not an option let's say that you have two people that are both working on tweaking the level what you can do you could have one person they do their work in it and then they commit their work they push it to the develop branch and then the other person would come over here and they would fetch and so after hearing that there's an update on that branch the other teammate could fetch the repository to update what your computer knows about the remote repository and then click on here and click pull and that will pull the work that your friend pushed and then you can go in and work in that level commit your work push it back and you all could do that back and forth if you're working in a team of two people and it's a game jam yeah you can get away with working in the same branch you can get away with both working and develop but if you're working in a bigger group of people and for any longer running amount of time than just the weekend i would highly suggest that you work in different branches that are branching alpha develop so what should you name your branch well if it's a small team in a short project keep it simple just name it your first name or your username if you're on a bigger project if you're doing this in a larger team with task tracking software that has tickets i would recommend naming the branch the ticket that you're working on and then when you're done with that branch and done with the ticket you need to merge it back into develop and delete the branch not develop but the the ticket branch well let's show you how that works so as you can guess if i'm your geek eric my name is eric so i'm going to make a new branch this is this is a great spot here i want to make sure that my branch is branching off of develop so it's based on develop so let's create it i'm going to push my branch to the server now what i want to do is i want to come in to the godot project and let's make a change for demonstration purposes we're not going to make a big change we're just going to make a new scene let's call it world i'm going to save it to the root of the project and wait a couple seconds and it should show up over here now i'm going to commit this to my personal branch so now that i've committed it to my branch i'm going to push to origin so if you're working on a bigger team and this is not a game jam setting i would really recommend to when you're wanting to merge your branch back into develop that you make a pull request and you add someone to that pull request that is familiar with what you're working on so they can double check what you did because that second that second eye look can never hurt and often saves a lot of time when you click the create pull request button it opens up your web browser and you're wanting to send your pull request from your personal branch to develop you can name it whatever you like by default it's the name of that commit message and over here you can add people who are in your project so if you let's say working with two programmers and you do a code change you might send that you might add the other programmer as your reviewer if you've made lots of level changes and you have a designer on your team you should include your designer if it's a mixture of both add both doesn't matter in this case i'm not going to add anyone because i don't have anyone in the project except for me so i'm just going to merge it myself well i hope this video has been helpful for you now this was definitely focused toward beginners and i will be making a follow-up video a video targeted for more advanced skit topics there we'll be using the command line going through problems like merge conflicts and merge conflicts etc and uh well if that sounds like something that interests you then please subscribe to the channel like the video if you liked it if it was helpful if you stuck around this long you might as well ring that notification bell i also participate in many game jams you can check out some of my other ones and a series called game dev news to help you stay up to date with all things game day related thanks for watching see you next time
Info
Channel: yourgeekeric
Views: 1,272
Rating: undefined out of 5
Keywords: GitHub, Godot, GitHub and Godot, Git Tutorial
Id: 1rwa5kqFep4
Channel Id: undefined
Length: 23min 23sec (1403 seconds)
Published: Thu Aug 13 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.