Git Basics

Some of the basic stuff required to use Git

Install

sudo apt-get install git

Clone

Checkout in SVN world is known as clone in git , so i would try to give some counterparts here with svn. Although they work differently in background. Its fairly okay to start off and learn like this

git clone URL directory

URL is repository URL
directory is place in local system where you want to clone

e.g

git clone https://github.com/jagatsingh/mapreduce-text-processing.git MapReduceLibrary

Add

Now when you create any file or modify any file we need to do add operation telling git then i want this file to go in next commit

Syntax

git add filename
or
git add directoryname

e.g

git add readme

In SVN add is not required if the system already has this file and you modify it. But in git we need to tell it to add the file in next commit

Commit

git commit -m "Commit message"

After we are done with addition we can commit the set of files to system.

e.g

git commit -m "Committing the readme for the code"


Looking for more detailed tutorial , Read the link below

http://git-scm.com/book/en/Git-Basics-Recording-Changes-to-the-Repository

No comments:

Post a Comment

Please share your views and comments below.

Thank You.