Saturday, April 7, 2018

Everything you want to know about GIT

Git was created by Linus Torvalds the maker of Linux.

Bitkeeper was used by Linux system from 2002 - 2005 but Linus decided to write their own DVCS and hence the GIT was invented written in Pearl and C.

Installing Git on Windows: 
using msysgit http://msysgit.github.com

Installing on Mac
using Home Brew
   brew install git

if not using home brew, you can also download DMG package
http://git-scm.com/download/mac


To verify once git is installed, type the following command in Terminal to check the git version

git --version

Installing on Linux:
apt-get install git-core (Debian/Ubuntu)
yum install git-core (Fidora)


Git provides 3 different configuration stores:
1. System Level configuration

   git config --system
2. User level

git config --global

stored in user home directory with filename  ~/.gitconfig or c:\users\\.gitConfig

3. Repo level
   git config

stored in .git/config in each repo


Setting the Configuration

git config --global user.name
git config --global user.email
git config --global core.editor
git config --global help.autocorrect 1
git config --global color.ui auto
git config -global core.autocrlf true | false | input


git init


git status

git add

git add -u

git add -A

git commit -m 

git log

git diff

git diff Head~1















No comments: