Download - Khorshed presentation-digital world2016
Version Control With
/Khorshed.RS
MD. KHORSHED ALAMCEO & Founder
/in/Khorshedrs
/Khorshed.RS
Everyday Workflow
Create a fileSave itEdit itSave it againEtc …..
Everyday Workflow
Everyday Workflow
Can we automate this?
When WhatWhyWho
For each document version, we need to know
Story of Git
"I'm an egotistical bastard, so I name all my projects after myself. First Linux, now Git”
Linus Torvalds, PC World. 2012-07-14
Story of Git
Linus needed a new source code revision manager forLinux, and none of the available options in 2005 where
good enough, so he wrote his own in.
Kernel 2.6.12 was the first release managed by Git andversion 1.0 of Git was released in December 2005.
What Is Git ?Distributed Version
Control System Directory
Tree History Storage System
Stupid Content Tracker
Whatever You Think About It ….
uper Cool
Distributed
1Everyone has the complete history
3
2
4
Everything is done offlineExcept Push / Pull
No central authorityExcept by convention
Changes can be shared without a server
Git popularity according to OpenHub.net
CVS10%
GIT38%
MERCURIAL
2%SUBVERSION
48%
Git might feel difficult at first,but once you learn it, you neverwant to go back to anything less
flexible and powerful.
Installing GIThttps://git-scm.com
First Time SetupCheck Version
$ git --version
Setup User$ git config --global user.name “rssoftware”$ git config --global user.email ”[email protected]”$ git config --list
Init$ cd project
$ git init
Status$ git status
.gitignore$ touch .gitignore
Add$ git add <file>
or$ git add .
Reset$ git reset <file>
or$ git reset .
Commit$ git commit –m "detailed message"
Log$ git log
Show$ git show
or$ git show <hash_id>
DiffWorking :
$ git diff$ git diff <file>
Staging :$ git diff --cached$ git diff –-cached <file>
Branching
$git branch my-feature
One feature = One branch
Working in the Branch
$git checkout my-feature$git commit (x2)
Merge
$git checkout master$git diff master..my-feature
$git merge my-feature
Clean Up
$git branch -d my-feature
Thank you for your attention