Wednesday, September 18, 2013

A beginner's Guide to GIT command in Linux


GIT is a version control system, which maintains the versions of your code,(if you are a developer!) This Guide will help you to install git in linux, and commit your code in github.

How to install Git in linux
To install git in Linux, you need to run the below command in the terminal, open your terminal,
sudo apt-get install git
This command will install git in your linux machine.

Basic git command

After installing the git you need to setup the enviroment for git, for that you need to configure the git,
git config
Sets configuration values for your user name, email, gpg key, preferred diff algorithm, file formats and more. Example:
git config --global user.name "iGyan" 

git config --global user.email "iGyan.Org@Gmail.com" 
After configuring the git you need to make a branch tree for your code, for thet go to your code directory in terminal using and cd command and write.
git init
it Initializes a git repository and creates the initial ‘.git’ directory in a new or in an existing project.
now if you see the status of your branch using
git status 
to add the file in the branch you need to run add command like
git add
After adding the files you need to commit the code in your local system using
git commit -m ‘Added Some code’
here -m stands for the message, and in quoted string is your message.
And then you need to push the code to the repository of GIT like
git push https://github.com/iGyanCode/iGyan.git
after push you need to give a branch path which usually ends with *.git

I am Still Updating this one!

Have a Happy Linux!

Tuesday, September 3, 2013

Create Useful and handy commands with alias


Linux Alias
An alias is command line shortcuts. creating alias means that you will spend less time on typing the complex commands, you can create alias in linux that give meaningful names to obscure commands,