Git : Basic Installation and Configuration

Git is a distributed revision control and source code management (SCM) system with an emphasis on speed, data integrity, and support for distributed, non-linear workflows. Git was initially designed and developed by Linus Torvalds for Linux kernel development in 2005, and has since become the most widely adopted version control system for software development. Wikipedia

Git : Basic Installation and Configuration


Now git it is widely used by developers and are compulsory in control for every potential new developers. Actually, we can build on the server itself in our server, now now there are many free services like github, bitbucket, etc..

So here i just share a tutorial "Git : Basic Installation and Configuration". Here I will use github, so please register to github.com, iif you already have github account, you can continue this tutorial. I assume you have already registered in github.com.

Register and Setting our account

Step 1 - Generate SSH-Key for authentication to github.com
you can read my post before here.

Step 2 - Open your public key with gedit or another editor and copy text.
cd .ssh
gedit id_rsa.pub
Step 3 - Log in to your github account

Step 4 - Go to account setting and click on SSH Keys tab.
you can go to this https://github.com/settings/ssh

Step 5 - Add new SSH Key and paste the text on Step 2 and save it.

Step 6 - Go to your terminal and add your account.
git config --global user.name "Your Name"
git config --global user.email "Your Email"
Step 7 - Back to github.com and Add new repositories
click on the top right, there is [+] and click New Repositories. Click link https://github.com/new
ex : myrepos

Oke i hope you understand and read it all.

First commit and push

Step 1 - Back to terminal and add New directories "myrepos" and file
mkdir myrepos
cd myrepos
touch README.md
Step 2 - initialization a git on our directories
git init
Step 3 - Connect a folder we have created "myrepos" with github
git remote add origin https://github.com:username/myrepos.git
Step 4 - Add all the files and subdirectories to our repository with the command:
git add .
Step 5 - Now our first commit
try edit README.md :
nano README.md
git commit -m "what have i done"
commit : is the git command to record all the changes
-m : a message / comment that we wish to associate with all these changes.

Step 6 - Now send all that we commit to github
git push -u origin master
See my screnshot below :

Git : Basic Installation and Configuration

It is just simple tutorial and so short about Git, i think you can do it all and lean to be better by see manual on github.com.
Title : Git : Basic Installation and Configuration
Description : Git is a distributed revision control and source code management (SCM) system with an emphasis on speed, data integrity, and support for di...

0 Response to "Git : Basic Installation and Configuration"

Post a Comment