How to use GitHub with Unity | Easy Tutorial 2024

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys it's Matt welcome to speedor and are you one of those people who often forgets to back up their own work and you might have lost tens of hours of work time I've done it before myself now today I'm going to show you how you can use GitHub to back up your own projects and on new projects and use those to be able to have your own sens of Version Control and never lose anything again so the best way to get started is to go to desktop. github.com and download the GitHub desktop client for Windows and there is one for Mac just click on that to be able to download I would recommend just to click on the exe it will welcome you to GitHub desktop and you can just click sign into GitHub or if you don't already have a free account you can create one yourself so once you've created yourself a simple account you can click to sign in and you can give GitHub desktop access to your GitHub account and you can press authorize and then it will ask you to configure it and you can use your GitHub account with the same email address and click finish now there's a set of buttons that you can create so you can clone a repository from the internet if you've already got one on your account you can create one locally on your hard drive if you've never made a project before and starting a fresh but if you want to clone an existing project that's on your hard drive it's a great way to back things up so we can click this make sure you click choose and find the location of your Unity project and here I've got a project called pong game Ultra that I was working on and I can click select and you can see that it's currently not a repository so it's not built to be able to be used but we can just click the little button which says create repository now we can give it a name we can just keep it the the same name as it was before you can add a little description then you can choose to initialize with a read me which on your main page you can have something which shows some details about your asset if you really want and get ignore you want to make sure that you choose the unity option which will make sure that it won't include any Unity files which are large or temporary which are not really relevant you can set a license if you understand that I want to use it but it doesn't matter for now and you can just click create repository and while you're looking to back everything up coming support the channel on patreon because you can get access to over 225 different scripts assets and projects you cannot find anywhere else and then if it does bring up a message saying that initialize the get lfs just press not now because our project shouldn't be big enough to require this and then once you see this you can see the history which does have all the assets that we'll need to upload and we can push to the repository and then we make sure that we can keep this private if we want but it's still got the same name and the same description we can push the repository to GitHub now we've added this project to GitHub now if we want to open it and make some changes we'll see how this affects the actual system now I'm in my project and what I'm going to do I'm I'm just going to create a quick script so now we've created this test script in our Unity project now if you go back you can see that I have now the test script which is a change that can be added now that I can give some information at the bottom to say what have I created test script and you can give a description if you need some more information if youve added a lot of different things I've been working on something particular and you can click commit to main once we've done that we need to make sure that we click push to origin and then if I go to my main GitHub page and I go to my assets and then I go inside the pong game you'll see that test script is there and it is being created and there are some quick shortcuts on your main page which are and this will show in Explorer to show you exactly where all your GitHub repository is or then view on GitHub and it will take you straight there and in the actual directory you will see the file called get ignore if you open that up in a text editor or code editor you could see that all the things that Unity will ignore so say you've got any big files you can actually specify to actually not get those uploaded to get if you've got some really big texture files that you don't want to commit or maybe some light maps from Unity you need to make sure they have the extension for that and make sure you add that in here because you would have to use get lfs like it said initially if you wanted to upload much larger files over over the current storage I'm going to give you an example if you accidentally remove your repository or come to a new pc you might want to add your repository back from the internet I'm going to drag my folder and put it into the recycle bin and then it will say that it can't find my pong game Ultra so what I'm going to do is I'm just going to say that I'm going to clone again and as you can see again in my tutorials folder where I previously had the game you can see pong game Ultra and now I'm going to open that up in unity again to make sure that it's all okay un functional it may take a little bit of time cuz we have to rebuild the library folder and the temporary files and as you can see see that it's all working as we expected so I brought the project back from the dead and again if you need to access this from a new computer or anything like that you can click clone repository I'll go to file clone repository do be sure to check out all the links down below for all the best sales savings and everything you can find in gamedev big thank you to all my patrons a special thank you to Peter Steiner and you can also check out 225 different scripts assets and projects you cannot find anywhere else so thank you to everybody else who comes to watch the video don't forget to like comment and subscribe cheers
Info
Channel: SpeedTutor
Views: 1,628
Rating: undefined out of 5
Keywords: unity, unity3d, beginner, easy, how, to, howto, learn, tutorial, tutorials, game, development, develop, games, programming, coding, basic, basics, course, github, version control, version, control, git, desktop, hub, source, pull, push, commit, merge, changes, change, branches, github for unity, github with unity, setup, install, speedtutor unity, speed tutor unity, unity3d tutorial, brackeys, unity 2024, unity github tutorial, github unity
Id: elVznOCUu2Q
Channel Id: undefined
Length: 5min 1sec (301 seconds)
Published: Fri Mar 15 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.