SlideShare a Scribd company logo
Git Introduction
@d_danailov
Git Introduction
Dimitar Danailov
Senior Developer at 158ltd.com
dimityr.danailov[at]gmail.com
Slideshare.net
Github
YouTube
Founder at VarnaIT
Git introduction
Topics Today
● What is Git ?
● Git Init
● Git Branches
● Git Merging
● Git Conflicts
What is Git ?
Git is an open source,
distributed version control
system designed for speed
and efficiency
Git is an open source,
distributed version control
system designed for speed
and efficiency
Git introduction
Git is an open source,
distributed version control
system designed for speed
and efficiency
Centralized source control
vs
distributed version control
Centralized source control
Computer A
Checkout
File
Central VSC Server
Version Database
Version 3
Version 2
Version 1
Computer A
Checkout
File
Central VSC Server
Version Database
Version 3
Version 2
Version 1
Computer B
Checkout
File
distributed version control
Computer B
Version Database
Computer A
Version Database
Version 3
Version 2
Version 1 Version 1
Version 2
Version 3
Server Computer
Version Database
Version 3
Version 2
Version 1
Fully Distributed
(almost) everything is local
Git introduction
git log
git status
Git Configurations
git config --global user.name “My Name”
git config --global user.email
“myemail@example.com”
git config --global color.ui true
Create an empty Git
repository
git init
Git introduction
Git introduction
touch hello_world.rb
git add hello_world.rb
git commit
Git introduction
Git introduction
Git introduction
Git Clone
git clone
https://github.com/git/git
Git introduction
Edit files vim / emacs / etc
Stage the changes git add (file)
Review your changes git status / git diff
Commit the changes git commit
A Basic Workflow
Git introduction
Git Version Number
Git Branching
lightweight, movable
pointers to a commit
Branch
C1
Snapshot
git checkout -b [branch_name]
git branch
git checkout [branch_name]
git diff
git merge [branch_name]
Master
Commit
fb4d2f8
Master
Commit
fb4d2f8
Head
Head is
pointer to
current
branch
Head
git branch i18n
Master
fb4d2f8
Head
git branch i18n
Master
i18n
fb4d2f8
Head
git branch i18n
Master
i18n
fb4d2f8
$ git branch
* master
* i18n
git branch i18n
fb4d2f8
Head
i18n
$ git branch
* master
* i18n
Master
git commit
fb4d2f8
Head
i18n
Master
e1c6bf1
git commit
fb4d2f8
Head
i18n
Master
e1c6bf1
git checkout -b iss53 master
fb4d2f8
Master
e1c6bf1
Head
i18n
32ac6d1
git checkout master;
git checkout -b iss53
fb4d2f8
Master
e1c6bf1
i18n
32ac6d1
Head
iss53
fb4d2f8
Master
e1c6bf1
i18n
32ac6d1
k134ab1 a18cea1
iss53Head
git commit
Merging
fb4d2f8
Master
e1c6bf1
i18n
32ac6d1
k134ab1 a18cea1
iss53
Head
git checkout master
fb4d2f8
Master
e1c6bf1
i18n
32ac6d1
k134ab1 a18cea1
iss53
Head
git merge iss53
fb4d2f8
Master
e1c6bf1
i18n
32ac6d1
k134ab1 a18cea1
iss53
Head
git checkout master
Snapshot
fast-forward merge
fb4d2f8
Master
e1c6bf1
i18n
32ac6d1
k134ab1 a18cea1
iss53Head
git merge iss53
fb4d2f8
Master
e1c6bf1
i18n
32ac6d1
k134ab1 a18cea1
iss53Head
git merge i18n
non fast-forward merge
fb4d2f8
Master
e1c6bf1
i18n
32ac6d1
k134ab1 a18cea1
iss53Head
git merge i18n
We need a
new tree
fb4d2f8
Master
e1c6bf1
i18n
32ac6d1
k134ab1 a18cea1
iss53Head
git merge i18n
Lock History
and find best
merge base
fb4d2f8
Master
e1c6bf1
i18n
32ac6d1
k134ab1 a18cea1
iss53Head
git merge i18n
c3d Readme.tx
f13 Hello.c
c3d Readme.tx
9ec Hello.c
3ab i18n.c
c3d Readme.tx
f13 Hello.c
5ff issue.c
fb4d2f8
Master
e1c6bf1
i18n
32ac6d1
k134ab1 a18cea1
iss53Head
git merge i18n
c3d Readme.tx
f13 Hello.c
c3d Readme.tx
9ec Hello.c
3ab i18n.c
c3d Readme.tx
f13 Hello.c
5ff issue.c
Master
e1c6bf1
i18n
32ac6d1
k134ab1 a18cea1
iss53Head
git merge i18n
c3d Readme.tx
9ec Hello.c
3ab i18n.c
c3d Readme.tx
f13 Hello.c
5ff issue.c
fb4d2f8c3d Readme.tx
f13 Hello.c
fb4d2f8c3d Readme.tx
9ec Hello.c
5ff issue.c
3ab i18n.c
iss53
e1c6bf1
i18n
32ac6d1
k134ab1 a18cea1
master
git merge i18n
c3d Readme.tx
9ec Hello.c
3ab i18n.c
c3d Readme.tx
f13 Hello.c
5ff issue.c
fb4d2f8c3d Readme.tx
f13 Hello.c
fb4d2f8c3d Readme.tx
9ec Hello.c
5ff issue.c
3ab i18n.c
Head
iss53
e1c6bf1
i18n
32ac6d1
k134ab1 a18cea1
master
git merge i18n
fb4d2f8 954cba1
Head
Git introduction
● https://www.youtube.com/watch?v=ZDR433b0HJY&list=PLH2J_JZ4HZUtsholk1M9tQintjo-4rV8j
● http://git-scm.com/
● http://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
Questions
Dimitar Danailov
Senior Developer at 158ltd.com
dimityr.danailov[at]gmail.com
Slideshare.net
Github
YouTube
Founder at VarnaIT

More Related Content

Viewers also liked (7)

PDF
ASP.NET MVC - Knockoutjs and MVVM
Dimitar Danailov
 
PDF
ASP.NET - Architecting single page applications with knockout.js
Dimitar Danailov
 
PPTX
Angularjs Performance
Steven Lambert
 
PDF
Mongo DB Terms - Mentormate Academy
Dimitar Danailov
 
PDF
Microservices - Code Voyagers Sofia
Dimitar Danailov
 
PDF
HackConf2015 - Ruby on Rails: Unexpected journey
Dimitar Danailov
 
PDF
HackConf2016 - Ruby on Rails: Unexpected journey
Dimitar Danailov
 
ASP.NET MVC - Knockoutjs and MVVM
Dimitar Danailov
 
ASP.NET - Architecting single page applications with knockout.js
Dimitar Danailov
 
Angularjs Performance
Steven Lambert
 
Mongo DB Terms - Mentormate Academy
Dimitar Danailov
 
Microservices - Code Voyagers Sofia
Dimitar Danailov
 
HackConf2015 - Ruby on Rails: Unexpected journey
Dimitar Danailov
 
HackConf2016 - Ruby on Rails: Unexpected journey
Dimitar Danailov
 

Similar to Git introduction (20)

PPTX
Introduction to Git.pptx
gdscuds
 
PDF
Pro git - grasping it conceptually
seungzzang Kim
 
PDF
Git 入门 与 实践
Terry Wang
 
PDF
Git
Terry Wang
 
PDF
Git with the flow
Dana White
 
PDF
Git workflows automat-it
Automat-IT
 
PDF
Managing e commerce systems codebase with git
Bruno Ricardo Siqueira
 
PDF
Git Commands Every Developer Should Know?
9 series
 
PPTX
Git & github
Mohamed Abdallah
 
PDF
Introduction to git, an efficient distributed version control system
AlbanLevy
 
KEY
Working with Git
Pete Nicholls
 
PPTX
Git basics to advance with diagrams
Dilum Navanjana
 
PDF
Getting Started with Git
Rick Umali
 
PDF
M.Mozūras - git
Agile Lietuva
 
PPTX
Git & GitHub 101farwsfrwvnfuvnvjvvv.pptx
sihoxe6756
 
PDF
Managing releases effectively through git
Mohd Farid
 
PDF
Git For The Android Developer
Effective
 
KEY
Git Magic: Versioning Files like a Boss
tmacwilliam
 
PDF
Tech thursdays / GIT
Marek Prochera
 
ODP
Introduction to Git (Greg Lonnon)
Boise Web Technologies Group
 
Introduction to Git.pptx
gdscuds
 
Pro git - grasping it conceptually
seungzzang Kim
 
Git 入门 与 实践
Terry Wang
 
Git with the flow
Dana White
 
Git workflows automat-it
Automat-IT
 
Managing e commerce systems codebase with git
Bruno Ricardo Siqueira
 
Git Commands Every Developer Should Know?
9 series
 
Git & github
Mohamed Abdallah
 
Introduction to git, an efficient distributed version control system
AlbanLevy
 
Working with Git
Pete Nicholls
 
Git basics to advance with diagrams
Dilum Navanjana
 
Getting Started with Git
Rick Umali
 
M.Mozūras - git
Agile Lietuva
 
Git & GitHub 101farwsfrwvnfuvnvjvvv.pptx
sihoxe6756
 
Managing releases effectively through git
Mohd Farid
 
Git For The Android Developer
Effective
 
Git Magic: Versioning Files like a Boss
tmacwilliam
 
Tech thursdays / GIT
Marek Prochera
 
Introduction to Git (Greg Lonnon)
Boise Web Technologies Group
 
Ad

More from Dimitar Danailov (20)

PDF
Evolution - ReConnect() 2019
Dimitar Danailov
 
PDF
Data Visualization and D3Js
Dimitar Danailov
 
PDF
#Productivity - {S:01 Ep:03}
Dimitar Danailov
 
PDF
#Productivity - {S:01 Ep:02}
Dimitar Danailov
 
PDF
#Productivity s01 ep02
Dimitar Danailov
 
PDF
#Productivity s01 ep01
Dimitar Danailov
 
PDF
Cloud Conf Varna - Cloud Application with AWS Lambda functions
Dimitar Danailov
 
PDF
DEV.BG - Angular 1 and Jasmine (Unit Testing and TDD)
Dimitar Danailov
 
PDF
Building modern Progressive Web Apps with Polymer
Dimitar Danailov
 
PDF
Typescript - MentorMate Academy
Dimitar Danailov
 
PDF
Startup Europe Week - Cloud Conf Varna & GDG Varna
Dimitar Danailov
 
PDF
GDG Varna - Hadoop
Dimitar Danailov
 
PDF
MicroServices: Advantages ans Disadvantages
Dimitar Danailov
 
PDF
GDG Varna - EcmaScript 6
Dimitar Danailov
 
PDF
Softuni.bg - Microservices
Dimitar Danailov
 
PDF
Lighting talks - Microservices
Dimitar Danailov
 
PDF
GDG Varna - When Android Meets Maps
Dimitar Danailov
 
PDF
ASP.NET MVC - jQuery, Minification, Json
Dimitar Danailov
 
PDF
ASP.NET MVC - Javascript Overview
Dimitar Danailov
 
PDF
ASP.NET MVC - Public, Private Clouds and ICN.Bg
Dimitar Danailov
 
Evolution - ReConnect() 2019
Dimitar Danailov
 
Data Visualization and D3Js
Dimitar Danailov
 
#Productivity - {S:01 Ep:03}
Dimitar Danailov
 
#Productivity - {S:01 Ep:02}
Dimitar Danailov
 
#Productivity s01 ep02
Dimitar Danailov
 
#Productivity s01 ep01
Dimitar Danailov
 
Cloud Conf Varna - Cloud Application with AWS Lambda functions
Dimitar Danailov
 
DEV.BG - Angular 1 and Jasmine (Unit Testing and TDD)
Dimitar Danailov
 
Building modern Progressive Web Apps with Polymer
Dimitar Danailov
 
Typescript - MentorMate Academy
Dimitar Danailov
 
Startup Europe Week - Cloud Conf Varna & GDG Varna
Dimitar Danailov
 
GDG Varna - Hadoop
Dimitar Danailov
 
MicroServices: Advantages ans Disadvantages
Dimitar Danailov
 
GDG Varna - EcmaScript 6
Dimitar Danailov
 
Softuni.bg - Microservices
Dimitar Danailov
 
Lighting talks - Microservices
Dimitar Danailov
 
GDG Varna - When Android Meets Maps
Dimitar Danailov
 
ASP.NET MVC - jQuery, Minification, Json
Dimitar Danailov
 
ASP.NET MVC - Javascript Overview
Dimitar Danailov
 
ASP.NET MVC - Public, Private Clouds and ICN.Bg
Dimitar Danailov
 
Ad

Recently uploaded (20)

PPTX
Transforming Insights: How Generative AI is Revolutionizing Data Analytics
LetsAI Solutions
 
PPTX
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PDF
NSF Converter Simplified: From Complexity to Clarity
Johnsena Crook
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PDF
Best Web development company in india 2025
Greenusys
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PDF
NPD Software -Omnex systems
omnex systems
 
PDF
Ready Layer One: Intro to the Model Context Protocol
mmckenna1
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
10 Salesforce Consulting Companies in Sydney.pdf
DianApps Technologies
 
PDF
Code and No-Code Journeys: The Maintenance Shortcut
Applitools
 
PPTX
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
Transforming Insights: How Generative AI is Revolutionizing Data Analytics
LetsAI Solutions
 
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
NSF Converter Simplified: From Complexity to Clarity
Johnsena Crook
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
Best Web development company in india 2025
Greenusys
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
NPD Software -Omnex systems
omnex systems
 
Ready Layer One: Intro to the Model Context Protocol
mmckenna1
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
10 Salesforce Consulting Companies in Sydney.pdf
DianApps Technologies
 
Code and No-Code Journeys: The Maintenance Shortcut
Applitools
 
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 

Git introduction