This tutorial is for beginner who want to get started with git and github. The tutorial will be divided into four sections;
- Installing git
- Intro to github
- Working with git
Installing Git
To be able to use git on your terminal there is need to get git install on your machine. Download latest version of git visit https://git-scm.com/downloads. After download install the file by following the guide. Once installed, select lunch to lunch the git bash and click finished. the git bash is now lunched

Working with git
Open git bash if you have not open it before by typing git bash on window search. on the git bash terminal run the following commands;
- To check the git version run git –version. This will bring out the version of git install
- To create a folder you will need to run this command “mkdir foldername”. The mkdir is a window command to create a folder (Make sure to use the choice name for your folder name in my case i use git-tutorial-sample).
- Type “cd foldername” to move into the folder. Now, that you are inside the folder, you will need to run the following basic git commands;
- To initialize git run the “git init”.
- Go to the foldername on your machine and create a text file let say demo.txt. Then open the file and type something inside.
- Next run “git status” command in your git bash , what you will see will be similar to the image below. Demo.txt is in red showing it has not been added to git
- Run “git add demo.text”. You may check again by run git status , this time around the demo.txt will be in green indicating it has been added to git
- Run “git commit –m “first commit”” to commit the recent changes you have made
- Create account on git by visiting www.github.com. Fill in your email, password and other details .Confirm your email.
- Create a repo by clicking on new repo button located at the top right corner
- To link your local git files to your remote repository run “git config –global user.username “username”” in my case git config –global user.username “kunle1984” and also “git config –global user.email “emailaddress””(Your git username and password)
- Now, run “git remote add origin git_url.git ” in my case git remote add origin https://github.com/kunle1984/kunle-git-tutorial.git
- Lastly run “git push origin master to copy the file to the remote repo
- Check your repo you will see something similar to the image below.

Thanks for reading…

