git introduction

Installation

git can be founded from http://git-scm.com/

Git and Github

  • Signup for Github Account
  • Go to Account Setting –> SSH Public Keys
  • Click Add public key and paste your public key       https://help.github.com/articles/generating-ssh-keys

Cloning an existing Repository

$ git clone <repository-uri>

Create new Repository

$ git init

$ git add .

$ git commit -m ‘initial project version’

$ git remote add origin <repository-uri>

$ git push -u origin master

Checking the Status of your file

$ git status

Create a new Branch

$ git branch <NameofBranch>

Move on to a Branch

$ git checkout <NameofBranch>

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s