khorshed presentation-digital world2016
TRANSCRIPT
![Page 1: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/1.jpg)
Version Control With
![Page 2: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/2.jpg)
/Khorshed.RS
MD. KHORSHED ALAMCEO & Founder
/in/Khorshedrs
/Khorshed.RS
![Page 3: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/3.jpg)
Everyday Workflow
Create a fileSave itEdit itSave it againEtc …..
![Page 4: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/4.jpg)
Everyday Workflow
![Page 5: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/5.jpg)
Everyday Workflow
![Page 6: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/6.jpg)
Can we automate this?
When WhatWhyWho
For each document version, we need to know
![Page 7: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/7.jpg)
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
![Page 8: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/8.jpg)
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.
![Page 9: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/9.jpg)
What Is Git ?Distributed Version
Control System Directory
Tree History Storage System
Stupid Content Tracker
![Page 10: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/10.jpg)
Whatever You Think About It ….
uper Cool
![Page 11: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/11.jpg)
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
![Page 12: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/12.jpg)
Git popularity according to OpenHub.net
CVS10%
GIT38%
MERCURIAL
2%SUBVERSION
48%
![Page 13: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/13.jpg)
Git might feel difficult at first,but once you learn it, you neverwant to go back to anything less
flexible and powerful.
![Page 14: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/14.jpg)
Installing GIThttps://git-scm.com
![Page 15: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/15.jpg)
First Time SetupCheck Version
$ git --version
Setup User$ git config --global user.name “rssoftware”$ git config --global user.email ”[email protected]”$ git config --list
![Page 16: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/16.jpg)
Init$ cd project
$ git init
![Page 17: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/17.jpg)
Status$ git status
![Page 18: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/18.jpg)
.gitignore$ touch .gitignore
![Page 19: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/19.jpg)
Add$ git add <file>
or$ git add .
![Page 20: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/20.jpg)
Reset$ git reset <file>
or$ git reset .
![Page 21: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/21.jpg)
Commit$ git commit –m "detailed message"
![Page 22: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/22.jpg)
Log$ git log
![Page 23: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/23.jpg)
Show$ git show
or$ git show <hash_id>
![Page 24: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/24.jpg)
DiffWorking :
$ git diff$ git diff <file>
Staging :$ git diff --cached$ git diff –-cached <file>
![Page 25: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/25.jpg)
Branching
$git branch my-feature
One feature = One branch
![Page 26: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/26.jpg)
Working in the Branch
$git checkout my-feature$git commit (x2)
![Page 27: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/27.jpg)
Merge
$git checkout master$git diff master..my-feature
$git merge my-feature
![Page 28: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/28.jpg)
Clean Up
$git branch -d my-feature
![Page 29: Khorshed presentation-digital world2016](https://reader036.vdocuments.us/reader036/viewer/2022062822/5886df651a28ab776a8b779b/html5/thumbnails/29.jpg)
Thank you for your attention