Git and GitHub Beginner Tutorial 3 - Getting started - Install Git windows

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to this session on git and github to raise the third session and today we are going to learn on how to get started with git on Windows so we will be installing get on Windows we will add our project files or folders for her to get for tracking we will look at some very basic git commands and finally we will push our project to a remote repository on the cloud ok so let us begin and let us see the very first step is your boot check if it is already installed so let us go to my Windows and go to your command prompt and say get space - hyphen version press ENTER now in my case because git is already installed I can see a good version if it is not installed I will see something like comma not found ok so I will assume that in raw case you are getting a command not found or some error message and you do not have it already installed so let us see how do we install kit so step two will be download and install git so you can go to your browser and say get the very first site that we will get is get SCM comm you can go to this particular site and here you will get the option to download get on Windows so just scroll down and you will see download for Windows and you will click here and you will get an exe file downloaded on your system so I am NOT doing it right now because I already have the file let me go to my downloads folder and show you exactly the file so this is the get exe that will get downloaded you can double click it and run the executable it will guide you through the installation process click Next leave it default click Next and here on this window you will get three options the very first option is to use git from git bash only so what git bash is a like you have this command prompt on your windows similarly there is a combined command-line utility for gate which is known as git bash and the advantage of using git bash is you will get all the commands or you can just type and autocomplete your command on get back so you do not have to type the entire command all by yourself and then there will be some you know colors of different types of command so it becomes very easy and interactive to work on get - so you can use the first thing the first option the second option is it will enable us to use git command from both git bash as well as from our decoder windows command prompt the only difference it will make in the environment variables is it will add a path of the get CMD to our environment variables and the third option will enable us to use the UNIX tools as well to our Windows command prompt the are most commonly used and a safe option is the second one so you can use the second option and click Next leave it as it is you can use the very first option here also you can use this windows default console click Next here also now you can click on install and it will install git on your system I will cancel it because I already have it and once it is installed you can see this git bash icon on your desktop and also on your Start menu ok so this is how you can get started with git and once it is installed you can open a new instance of command prompt and say get space - hyphen version and this time you should be able to see discrete version so this means get is now installed and you are ready to work on it okay so we have downloaded and installed it step three will be add your project to build okay now what does this project means is in very simple terms the project will be a folder where you will have have all your source code so let us create a folder and assume that that is our project and let us see how we can drag it and add it to it so let me create a new folder on my desktop and I say this is my project okay okay and now I have to add this to get so what I can do is I can open this let me resize the window so that you can exactly see what is happening okay now I have to go to command prompt or git bash and go to the location of this project one of the state forward shortcuts is you can go to this location on the folder Explorer and on the address bar you can say CMD press ENTER and it will open command prompt on the same location okay so here I will exit from here and here I can say I have to go to the location and then I will say git init okay and as soon as I do this you can see there is a empty not empty sorry it is a hidden dot git folder getting generated okay now this is the soul of get all the operations that we do on git will be this folder will help us do all the tracking and addition stupid okay so this is a hidden folder that will get added and now our git is tracking this folder all the additions changes that we do will get wrap now if you say git status so there is nothing to commit if I add something here let me add let me add a file I am adding a text file so you can see I have created a text test file here now if I do get status now you can see this is untracked file and it is asking us to add this file to start checking it right so now our git is checking this folder now let me show you we are now using git commands from a command prompt because during installation we selected second option which enables us to use git from our normal Windows command prompt or as well as from our get bash so we have already seen we can use it from a command prompt let me exit from here or let me just keep it as it is and see how can we use git bash so one of the ways is you can start get bash and then go to the location of the folder where you want to work or you can directly right click on the folder and here you will select this option okay get bash here let me just start it get bash here and see it has started this git bash on this folder let me do git status here and you should be able to see the same output and see it is showing as the same output that we got on our windows right so let me just exit from my Windows command and let us keep and continue using git bash so this is what exactly will be very handy and you can use good - okay so see we have added a test file that will also write down the commands so very first command was get in it to initialize tracking folder and files then we radicals tap this and now we will do a git add okay so now I will say git add and my file named test1 dot txt and now if I will get status and now you can see this is coming in three because now it is added but it is yet to be committed so I have to commit it right so for commit the command we use this git commit - M this is for adding any message during commit end in the inverted commas I can give some message so I will say get just a minute here I will say get there is some lag let me just do it again get commit space - em and message added test1 dot txt and enter okay now you can see it has committed if I do good status now you can see walking T is clean nothing to commit okay now let us see one thing let me do some changes in this file so let me do some change in this file save it okay so I have added a line change one in this file and saved it and also let me create a new file here so I will say dir symbol and let me create index dot HTML so see I have created index dot HTML and made some changes in test1 dot txt let us do git status now and see now you can see it is showing us that you have modified something in test1 dot txt and you have added a new file which is not yet added to grid and is unchecked so now we will do git add again and now we can use a we have to add both of these sides so we can also use wildcard characters like I can say a star dot star which will add everything with extensions or I can simply say get head dot which will add everything which is not added so now I will say gift commit - M the message added index dot HTML and modified test1dot txt enter and now everything is committed to a get status and everything is green okay so this is how you can add your projects or repositories or file to get okay now let us also see step number five we'll be adding to remote repository okay so let us go to Google and let us go to github and you have to create a free account here okay so I am going to github website okay you can do sign up you can give your information and create the account and then you can sign in so I am signing in to my account okay and as we have seen in the earlier sessions github is a website which provides us remote repositories so we can put all our work on the cloud so that it is backed up and it also provides a visual interface so now you can start a project or create a new repository from here let me give my name report to you can give some description may keep it public and create the repository okay and then you can copy it from here and then the command that you will be using is git remote add origin and the name or the location that we just copied off the repository okay so this is this the command that we will be using okay so let me just copy and put it on my git git remote add origin and the location press enter okay now if you go and refresh your repository on github still it will not show anything because we have not yet pushed our repository so now we have to push it and the command for that will be git push - u origin master and master is the name of the branch so this is the master branch okay and in the coming sessions we will see how to create other branches so this is the command that you have to use let me copy it and give it to my kid and yes now you can see it has added the repository in case you get a message to add username or password you have to give your github username or email and the password and to avoid getting that message every time you have to add your github user and email to your gate global properties and to do that you have to use these commands and actually this is this should be the very first thing that you should do after installing it so I should put these commands here actually this should be the first thing that you can do but you can do later on as well so you will do git git config global user email and you will give the email that we used while creating your github account so in my case I can give this something like automation dot u dot SEL that gmail.com okay and then you can also get your username that you used while creating your github account so in my case my github user name is Jakob automation so I will give this okay so the advantage of this is number one is whenever you are pushing the repository you will not get that a box to put your username and your password every time the second thing will be whatever commit you do from here on your github it will be reflected by your name so let us go to our github repository and refresh it again and this time we should see our changes and yes you can see all the changes and all the decisions we have made and also you can see this user added something right in case you do not add your username and email to get it will show you some other default user so it that's why you need to add your user and email okay so this is how you can give all the commands and add to your repository there are some other commands which will be helpful like get log and get help so you can do a git log it will show you the all the information whatever you have done so we have added test1 dot txt then we added index dot HTML and modified this file you can do get space - - help and it will show you all the options and commands that you can use with get ok so this is how you can get started with git on windows and there was the earlier session where we looked at getting started with kit on a Mac and the only difference between Windows and Mac will be the initial stage when to install it otherwise everything else will remain as it is because git is a program written in C and it is platform independent you can use it as it is whether you are on Windows or on Mac or on Linux the only small differences during the installation part which we have already covered so if you are on Windows still you can watch this session where I have covered almost the same things on a Mac and today we have seen how to do the same things on Windows hope you like it keep learning it thank you
Info
Channel: Automation Step by Step
Views: 84,083
Rating: undefined out of 5
Keywords: git, git hub, git and git hub, github, git and github, what is git, what is github, git beginner, github beginner, learn git and github, learn git, learn github, difference between git and github, git introduction, github introduction, git and github introduction, git basics, git and github basics, getting started with git, install git, download git, add repository on git hub, git hub account, git windows, windows git, git on windows
Id: sBTAkHOxvOk
Channel Id: undefined
Length: 19min 26sec (1166 seconds)
Published: Thu Oct 13 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.