Getting Started with Git and GitHub - Your First Repository

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome into another video on this channel today we'll be talking about a very important element for every developer which is git git is a Version Control System created by lenos tals the same person which created Linux and today we will go to a GitHub which is a web- based platform for developers and for GitHub for git repositories we will create ourselves as an account create ourselves a repo and then go to console and do everything so that we can push our local project to GitHub repository so let's see what we will do [Music] today all right so we are on a GitHub comom mine page and let's create ourselves firstly an account contact at briefly. def sign up this is my email let's create ourselves a password your user name briefly briefly not available de briefly death briefly okay continue all right let's wait a moment all right let's find this clue and let's do all all right I will go to I will go to my email in the back and get the code and we are almost finished skip all right we have our GitHub account so let's create ourselves a repo to which we'll push our latest nextjs too list so let's click here to create a repository and this is the owner so there briefly the account we created and let's call it a too list nextjs description and whatever it will be public or private it will if it will be P public anyone on the internet can see this repository you choose who can commit private you choose who can see and commit to this repository we will stick with public because in the future when we will be creating a new project I will push them at the end to the repo so that you have access to the code let's not add read me let's not add anything else let's just create this repository for now and then we will have the a little snippet what we need to do to push this to the GitHub repository so in the back here I'm on our Ubuntu server and let's do LS and I here have a projects folder in which there is this to the list project which we did lately one of the things in this project which nextjs did for us is the file called called git ignore so whatever there will be written in git ignore those files won't be committed to the repo it is a very brief description and a and a basic template from nextjs so that we let's say don't add node modules which weigh a lot and we can install them it doesn't go with a bolt folder and it doesn't go with like environment variables files or some theb locks so let's right now see what we would need to do the first thing for sure would be the git command itself I already have it pre-installed on this rebun 2 but if you would need to install git no matter if it will be a Windows based system or OSX based system you can go to the mine git page which is a free and open source and you can install for your specific OS then you will have access to a git CLI in git command and let's start adding the comments so first is get init it will initialize the repo in this particular folder and it creates Dot git folder in which it will store all the files related to the Version Control the next thing is to add the files so we will do git add dot it will add all the files to the comit which we want to prepare we will talk very deeply about git in the future videos so watch out for them let's just do a git add and it will add all the files right now let's do a git commit dm with a message so let's call git commit minus M with a message of too List YouTube Project okay outter identity you know please tell me who you are so if you want if you are starting with Git and you are installing it for the first time your system isn't yet prepared and combined with this account so first thing we need to do is to run those two commands so we will add to the operating system and to the G git config our email so I will add contact. briefly. Dev and we will add our name so that git knows who we are when we commit something so I'm another think username briefly def let's call it like that okay we have those two let's get back to get Comet I will take it from history okay we added those files we added this message we have ourselves a comet another thing is to instantiate a branch right now we will be instantiating with main the previous repos were usually a master Branch but the naming changed from Master to mine some time ago but you can use whatever name you would like the convention is that usually the main or the master produ production branch is called main or master and you have let's say QA Branch for QA Dev for development staging for staging and then your fit branches which we will talk in the future so let's to another command and then get remote at this will make a connection between our local repo and the repo we created on the GitHub com page so as you can see github.com Das Dev slev briefly so this is the usual GitHub convention so we have a domain name then we have a account and next there is a there is a name of the repo so let's click that and right now the last thing is to push so get push will push this repo and all those files with this commit message to the origin main so up to the GitHub servers to do that we will need to login so our username we know that it's def briefly but the password for some time already GitHub doesn't allow for you you to login with this specific password they disabled the password login you need to do it in two different ways we will need to go to settings and then at the bottom we have developer settings one this is one of the possibilities to unicate with GitHub so creating a personal access token either token classic which will allow you for access to everything on this account or find grain which allows us to create to specify the specific repos that this token has access to what permissions on those repo it has either it is only read or it it's right the other type of uh authentication would be an SSH key the SSH authentication it's something that we will cover in another video today just to go briefly about that with we will still create a classic token let's generate a new classic token I will write it briefly def you can see the note is just a note for you there is an expiration on this token on not on expiration I will make it 90 days and here is the scope so let's do a scope to the repost there can be also a scope to workflows or some admins stuff we will not get into details of that today so we have a repost cope and a token let's generate it and here we have our token if you will go and skip this page or go out of this page this is something that you cannot get back so if you want write this this token somewhere you need to go back delete the token and to create a new one all right we have token and the token is going into the password field so I'm pushing it to here and we are correctly authenticated and we pushed to the dev briefly so let's go to the m page let's go to our repo and we will see that we have our very first commit and the files are here so whatever you have in readme file it's present that here it's an xjs template and here you can view let's say commits so we have our first commit to the list YouTube Project committed by Dev briefly and that's everything for today we will go into git and GitHub a lot more in the future see you next time
Info
Channel: DEVelopment Briefly
Views: 288
Rating: undefined out of 5
Keywords:
Id: kLOxHzoWKaU
Channel Id: undefined
Length: 11min 52sec (712 seconds)
Published: Sun Jun 30 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.