LongCut logo

How To Use GitHub For Beginners

By corbin

Summary

Topics Covered

  • Highlights from 00:00-02:24
  • Highlights from 02:13-04:30
  • Highlights from 04:19-06:35
  • Highlights from 06:25-08:49
  • Highlights from 08:37-10:33

Full Transcript

let's learn everything we need to know about GitHub as if we were a complete beginner as fast as possible welcome back y'all I'm going to show you everything we need to know about GitHub when it comes to software development

web app development why we even use GitHub and the reason I'm creating this video actually is because I realized I've done a ton of content when it comes to how to approach coding if you have no experience using artificial intelligence and I just got to go over GitHub right

this is like one of the most fundamental things for software development to understand so let me just break it down as easy as possible everything you should really know about this platform first major thing what's amazing is that basically for

most of what you want to do you won't have to pay a single dime this is completely free simply just sign up I'll leave a link in the description down below so then your second question might be is when would I pay for this that's when you transition from a solo to a

small team to much more of a GitHub organization and even then when managing and running teams you're looking at $4 a month for a seat regardless though let's just see what this is about so I'm going to come up here I'm going to click my name and I'm going to say your profile

so this page right here is kind of like the collection of everything that's going on first thing I want you to understand repositories what is a repository this is where we store our code in the cloud if you've created

something with wind surf cursor VSS code like you know where that code is at within that what we call IDE integrated development environment like when you're playing around with the code on here that's on your machine that's local we

like to use things like GitHub so we can put this in the cloud putting in the cloud has a ton of different advantages which we'll jump into the first thing you just need to understand as a baseline is a repository is where we

store our code second thing that you may be looking at is 25 contributions anytime there's a green Little Dot here for a day that just means when you actually push something to a repo

publicly and then obviously that's just your profile so let's actually look at a repository here we're going to create a new one just to kind of walk through it a little bit so the idea is this we have our owner that's going to be you as a

individual and then you repo name this could be public facing if it is a public repository so I can just put test here next is going to be whether or not it's public or private so public means anyone

on the internet could find this repository find the code in it and take it or use it or download it private is very clear in the sense of once you make it private only you as an account owner

has access to this code now when it comes to setting this all up connecting GitHub here to VSS code here I'm going to leave a video down below that shows you how to do with cursor AI very simple

connect both GitHub and your IDE so you can start doing pushes and commits with branches what I want to go over in this video though is what to understand fundamentally about your repo in general

so I have a repo here that I created in a 2hour and 30 minute series when it came to creating a backend so let's walk through this user interface a little bit so it doesn't look so crazy so the first major thing that you need to understand

when looking at this is what we call branches so right now there is only one branch main here's what that means we have a line here and this is main main

is how the code exists right now so all these files Source python function that's how the code exists now what we do when we create a branch is we're

taking this exact code of how it sits now and we're creating a duplication of the code so we'll come over here exact same code we're naming it so we'll just

say new footer or just say new but new f for new footer footer like the footer of the website new footer has the exact same code AS main branch exact same but the reason we're creating this branch is

so that when we start making changes to the code file EG we come over here we go to our source let's just say we go to app.js and we change something here that

won't affect the original main branch when I make a change in New F new footer that doesn't change the main branch code this is a whole separate Branch now

that's built off the main branch so what this allows us to do is that when I'm in New F the branch and I make a change in the code I keep going I keep going I

keep going I like it at any point if mess up so I keep going down that path I'm adding in I'm adding code I'm changing files if at any point I mess up and I completely break the application or I'm just like what's going on what I

can do is simply delete this Branch if I chose to go this extreme delete this branch and I'm back at main main hasn't been touched Main's all good Main's where I left it that's one of the

reasons why we do branches so that we don't mess with the main branch and the reason the main branch is so fundamental this is supposed to be the code that's

it's not broken it functionally works throughout now yes obviously when you're just starting it's going to be like okay well the code doesn't work anyways because I just started well that's fine

but the idea is that the main branch is never really supposed to update unless it's absolutely clear that the new code that it's updating with is good to go so what does that mean in this context is

let's assume that I kept going down this little path of new F new footer then what we can do here and we're assuming the code is actually good like everything looks good we like it we do

something called merge and that's when we merge back to Main and then we'll delete new F because it's no longer needed as all the code changes that were here has now been merged back to main so

now Main's updated with all the code there so we delete new F so now we have a new version of main so your next question might be is Corbin how do I merge this is what we call po request so

we're going check out some closed ones here when you have a new Branch so for example here we created off done this is when we added authentication to this

repo can click it what this was is notice a commit from Main that Main Branch from the off branch and what we do here and notice how it says merge as

well there were files changed these files changed are what's different from the original code in the main to now off

so for example if I went to my source app.js the green means it was added the red means it was removed removed in the off Branch we added these two lines

which means in the main branch at this point before merging it they don't exist therefore once we merge though from off

to Maine now they exist this workflow is called PR request it's not absolutely necessary if you're really a true beginner and you're just learning and just wanting to go you don't have to do

new branches new PRS and all this craziness you could just keep committing to main there's no reason you can't it's just not a good practice long term I also want to make clear that in that video I referenced at the beginning of

this one I go over showing you how to do all this in terminal and actually doing the commands and teaching you step by step here this video I want to make very high level so you can kind of understand what the heck is the point of a PR and

all these different things that you see like right off the bat therefore let me show you an effective way that you can actually download public repo so you can start playing around and you can even download this one right here the way we're going to do this because this

doesn't require an SS H key or any type of access token as I go over in other videos is all we need to do simply is copy this https you're going to come

over to your IDE like VSS code cursor Ai and what you want to do is just simply create a folder anywhere so in theory you could just create a folder in your documents when I say folder I literally

mean folder like you know you right click and then just hit new folder new folder once you create your folder you're gonna do file open folder so I created a simple folder here called backin app this could have been called

anything got to call it apples and cheese now I'm going to come down here to the little warning sign and go to terminal what I'll do here since this is a public repo and this is the advantages of GitHub first off let's make sure you

install GitHub which will be Brew install git now if you're like Corbin I don't even have Brew I the mpm commands not working all that check out that 30 minute video below I show you how to do all that and make sure you have no JS installed so you can do these kind of

commands so once you do have get installed though all we need to do to get a public repo is very simple we do get cologne copy the https paste this URL hit enter and I

want to show you this as this is going to allow you to get really cool repos that are just publicly available and you can kind of dive through the code yourself like what's going on here this is interesting you kind of Click through

see what's up and keep going come over here to Uno go to Hom page.js and like whoa what's happening here and kind of scroll through that's the Baseline yes there is a ton of other stuff going on

here but you clicked on this video as a beginner's guide therefore a lot of this other stuff you'll slowly just start understanding more and more as you get going but I gave you the fundamental

tools and ways of approaching GitHub that as you get going and as you keep working in this kind of work environment everything else has become a lot more clear like for example you don't need to know what projects is right now you

don't need to know what insights mean you don't really need to know most of what settings have here what you do need to know is the fundamental idea of building software when it comes to

creating branches merging the Branch how to commit how to pull local code to your computer this is just fundamental let's just learn how to ride the bike before we jump on the motorcycle so here's what

I'm going to do so you can get a full comprehensive idea of how to approach this I'm going to leave my entire 2hour and 30 minute backend series that shows you how to build out real backends for applications in the description down

below and then before you jump into that I would encourage you to check out my 3our and 11 minute video that goes over how to build out front ends it's going to be a little bit more simple and allow you to grasp these ideas is a lot easier

when building out a front end back ends are obviously a lot more complex so this is a nice little pairing here where you start the front end then the back end and then by the end you'd have a very good comprehension of how to approach

GitHub in the context of web app development software development any type of development and just for reference in that three-hour video this is what we create we created an entire front end that's actually live webcafe

ai.com check it out this is all built with raw codee this doesn't cost me any money any month because of the fact that we actually built it out and we're not using something like web flow that's why it cost me no money I'm hosting it all

we're all good to go so that covers understanding how to use GitHub on a service level I plan on doing another video here that dives more into Branch commits and understanding why we do a branch commit and all the implications

of how to do a PR how to delete a branch how to even merge a lot of this stuff to be honest with you is found in my longer videos but I'll make a short concise nice little video I'll see you in the next video get Hub to random videos

that's my face I'll see you in the next video

Loading...

Loading video analysis...