GitGit
Paruthi{.exe}
Paruthi{.exe}
InfoInfo
If u r here then u might
If u r here then u might
already know “what is
already know “what is
GIT” am I right ?
GIT” am I right ?
This is a fast git tutorial
This is a fast git tutorial,,
no deep stuffs...
no deep stuffs...
SowhatisGIT
SowhatisGIT
 is a distributed revision
control and source code
management (SCM)
system with an emphasis
on speed.
Time to move to the
fastest distribute source
control.
Whomadethis
Whomadethis
 Initially designed and
developed by 
Linus Torvalds for Linux
kernel development
Current License : GPLv2
: GPLv2 
open source license
Features
Features
Branching and Merging
Branching and Merging
Small and Fast
Small and FastDistributed
DistributedData Assurance
Data AssuranceStaging Area
Staging AreaFree and Open Source
Free and Open Source
Createanew
Createanewrepository
repository
[ git init ] – command
[ git init ] – command
will create a new
will create a new
repository(working
repository(working
copy)
copy)
[ git init --bare ] :
[ git init --bare ] :
command will create the
command will create the
server side of the
server side of the
repository (this is where
repository (this is where
we save our changes)
we save our changes)
gitglobal
gitglobalconfiguration
configuration
git config --global
user.name “user name"
git config --global
user.email“name@mail.com"
git config –global
color.ui "auto“
Clone/Checkout
Clone/Checkout
fromarepository
fromarepository
Local :-
Local :-
[ git clone
[ git clone/path_of_src_repository
/path_of_src_repository
] : command creates a
] : command creates a
working copy of a local
working copy of a local
repository
repository
Clone/Checkout
Clone/Checkout
fromarepository
fromarepository
Server :-
Server :-[ git clone
[ git cloneusername@host:/path_o
username@host:/path_o
f_repository ] : command
f_repository ] : command
creates a working copy
creates a working copy
of a repository from
of a repository from
server
server
Addfilestogit
Addfilestogit
[git add filename ]:
[git add filename ]:
command adds the
command adds the
filename
filename
[git add *] : command
[git add *] : command
adds all the files in the
adds all the files in the
folder
folder
[git add *.py] :
[git add *.py] :
command adds all the
command adds all the
files with “.py” extention
files with “.py” extention
in the folder
in the folder
Getcurrentstatus
Getcurrentstatus
[git status] : command
[git status] : command
gives the current status
gives the current status
of files. Added, staged,
of files. Added, staged,
untracked, modified
untracked, modified
files…
files…
Committhe
Committhechanges
changes
It is time to save the
It is time to save the
changes to the git
changes to the git
[git commit –m
[git commit –m“comments about the
“comments about the
current code changes”] :
current code changes”] :
command will save the
command will save the
changes.
changes.
Pushtotheserver
Pushtotheserver
[git push <remote
[git push <remote
name> <branch
name> <branch
name>] : command will
name>] : command will
push the code in the
push the code in the
local folder to the
local folder to the
server.
server.
Pullthechanges
Pullthechanges
[[git pull <remotename>
<branchname>] :] :
command will update
command will update
the local code and
the local code and
merge with the new
merge with the new
code from the server.
code from the server.
Sourcecodehostingfor.git
 Following Web sites provide
repositories[info from wiki
info from wiki]:
 GitHub ; Assembla ;
Bitbucket CloudForge ;
CollabNet ; Gitorious ;
GNU Savannah ;
Google Code ; JavaForge;
SourceForge ; BerliOS ;
CodePlex Choose based on your
Choose based on your
requirement.
requirement. I have tried only GitHub,
I have tried only GitHub,
Bitbucket and assembla all
Bitbucket and assembla all
are good.
are good.

git fast & minimal