Git – Distributed Version Control System

How to set the username and email id for git repository

For Globally

git config –global “username”
git config –global “email id”

$git config –global “yourname”
$git config –global “”

After this when you do any commit then it will add your name and mail address to that commit. Now to see the changes cat the .gitconfig file in your home dir

$cat ~/.gitconfig

name = yourname
email =

For individual repository

if you want to use diffrent name and email id for a particular git then use as below after going in to that git repository.

$git config “yourname”
$git config “”

To check the changes view the file .git/config you will find the below entries in that file

$cat .git/config

name = yourname
email =

Change the default git comment editor

To change the default editor for you git use the flowing in my case I am using emacs as my favorite editor

$ git config –global core.editor emacs

Leave a Reply

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

You are commenting using your 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