Learn Git And Github - In Very Easy Way [Codex-1]

 

Welcome To TraxDinosaur,

So without wasting time lets start,

Hope you know what is Git and Github because without knowing it i dont think that you came here.

so im assuming that you know about Git and Github.

 

So lets start with Git.

To learn how to use git you have to know some basic things.

 

Some Linux Commands.

ls - to see what is in the folder

cd - to change folder

Example: cd trax (then you will go to current folder to trax named folder)

to go back again i have to use cd ..

mkdir (name) -it will make a new folder with given name.

rm (file or folder name) - it will delete file or folder

if folder have some file and rm command not removing it then we can force delete it

using rm -rf (file or folder name) it will delete whole folder or file forcefully.

 

Now Lets Learn About Some Basic Thing About GIT.

init - we use it for any things Starting. 

clone - to copy something(similar to copy) 

 add - we use it to Add something.

commit - its normal meaning is Change.

status -  to know about something's present changes

diff - a short form of difference

log - kind of history of what we did

reset - normally every one knows reset meaning

merge -  to combine two or more then two files to one


So this is a basic in a very very rough language, hope you get it all things what i said.

Now Lets Start

First of all we'll download git from its Official Website.Click Here, and install it in our computer.

and after go to any empty folder and use Right Click, you will get two options that open git gui and second open git bash.

We are now learning GIT BASH here.

 So open Git Bash.

You Will Find Command Line There # Ughh Sorry Guys I Cant Write Without Addiing First Letter Capital So Ignore This.

 So You Will Find Command Line There, So What We Learn Before?

Create A Folder. how? (Use Command Line Command - mkdir(Folder Name))

Ok We Created Folder.


Now What Is Repository?


Repository is literally a folder where our all other sub folders and files saved.

but when Git start tracking their changes then we call that folder as a Repository

Got it?

So Now After Creating A New Folder Go To That Folder Using Command Line.

How?? (Use cd (folder name) To Go Into That Folder)

Now We Can See Our Folder's Status That Is It A Git Repository Or Not..

How?? (Use git status Command)

You Will Get Some Text Look Like Error But It Just Saying That There Is No Repository Found So Cant Show Status.

Also We Should Add Our Name And Email For Looking Good Human:)
To Do That We Have One Command Named config user.name and config user.email

Example: git config --global user.name "name"
                git config --global user.email "email@email.com"
                (also can be use local but we want it work globally..)

Now How Can We Start Git To Track Our Folder [How To Convert Our Folder A Repository?

To Create A New Repository We'll Use A Command In Git Bash. 

git init - Using This Command We Can Convert Our Folder To Repository.[Not Compulsory That We Have To Create A New Folder]

 So Our Folder Is Converted To Repository,

Now You Can Check That git status Command Again.

 

Ok See You In New Post. [Codex-2]
By @TraxDinosaur

Post a Comment

0 Comments