git tutorial for beginers

What is Git ?

 

Git: Use to track your modified changes in a dir or files . we can now learn git using basic example.

 

The following tutorial will give you a practical experience in git. Please Read the blog completly and start practising in your ubuntu PC parallelly. Before starting the tutorial make sure you have to know about basic linux commands.

 

step-1: Before learning GIT, you need to know about basic command of git.

 

git init# to initialise the the git

git status# to know the modified changes

git add# to add the modifications to the git

git commit # to commit the added modifications to the git

git log# to show the added commits

git branch# to know the present git branch

git checkout# to change the one git branch to other git branch

 

Now we can go for an practical examples. login in your ubuntu pc and follow the below commands in terminal line.

 

$ mkdir git-dir

$ cd git-dir

git-dir/$ git init

git-dir/$ git status    # nothing will show its a empty dir.

git-dir/$ touch Readme

you can write some dummy data to the Readme file using “vi Readme”.

git-dir/$ git status# now “git status” will show the modified chnages that is “Readme”. note: chnages shows in RED color

git-dir/$ git add .# this will add the modified change to git

git-dir/$ git status# Now readme is in green color. it means that is added to git

 

git-dir/$ git commit -m “Added Readme support”# This will add to the commit

 

git-dir/$ git log# this will show the added commits to the git

 

git-dir/$ git format-patch -1# this will create a git patch.

 

Hope you got a good knowledge with this tutorial.is you really like it then share this to your friends to learn.

 

Want to learn more click here yoctotutor