SlideShare a Scribd company logo
A deeper look into
HumanTalks Grenoble 11 Février 2013
1Thursday, 19 June 14
About me
@sabativi
Grenoble Startup Digest Curator
Developer at Sogilis
2Thursday, 19 June 14
DISCLAIMER
http://www.jayway.com/author/philipnilsson/
3Thursday, 19 June 14
Decentralized version control
like Git has a lot of
momentum right now
4Thursday, 19 June 14
STOP COMPARING
SVN AND GIT
5Thursday, 19 June 14
Talk about git as
A purely functional data
structure
6Thursday, 19 June 14
Preliminiaries
7Thursday, 19 June 14
A functional data structure
is essentially an immutable
data structure: its values
never change.
8Thursday, 19 June 14
Example : A simple list
Let’s consider L: [ 3, 2, 1 ]
Let’s do operation INSERT(4) at
the front
If L is mutable then L: [ 4, 3, 2, 1 ]
9Thursday, 19 June 14
+---+ +---+ +---+ +---+
| 4 +--->+ 3 +--->+ 2 +--->+ 1 |
+---+ +---+ +---+ +---+
| |
new list original
Immutable
+---+ +---+ +---+ +---+
new list 1 -> | 4 +---+->+ 3 +--->+ 2 +--->+ 1 |
+---+ / +---+ +---+ +---+
/ |
+---+/ original
new list 2 -> | 9 +
+---+
10Thursday, 19 June 14
Immutable
+---+ +---+
updated list -> | 4 +--->+ 5 +----+
+---+ +---+ 

+---+ +---+ +-+-+ +---+
new list 1 -> | 4 +--->+ 3 +--->+ 2 +--->+ 1 |
+---+ / +---+ +---+ +---+
/ |
+---+/ original
new list 2 -> | 9 +
+---+
11Thursday, 19 June 14
GIT VS PURELY
FUNCTIONAL DATA
To update our code base
with new versions,
keeping old versions
available.
Collaborating on a single
code base without
updates interfering
with each other in an
unpredicable way.
Update data structure
while keeping the old
value of that data
available.
Updating a structure in
one place without
interfering with someone
elses updates of that
structure.
12Thursday, 19 June 14
Git basically is a purely
functional data structure,
with a command line
client that allows you to
perform operations on it.
13Thursday, 19 June 14
Let’s say we have a repository containing
commits A, B and C in that order, in the master
branch. We’ve told Git to store the entire
state of our working directory three times
during development.
We can represent this state of development as
the history [C,B,A]
+---+ +---+ +---+
+ C +--->+ B +--->+ A |
+---+ +---+ +---+
|
master
14Thursday, 19 June 14
Commiting
+---+ +---+ +---+ +---+
+ D +--->+ C +--->+ B +--->+ A |
+---+ +---+ +---+ +---+
| |
master master^
git commit
15Thursday, 19 June 14
Amending
+---+ +---+ +---+ +---+
ef4d34 -> | D +--+>+ C +--->+ B +--->+ A |
+---+ / +---+ +---+ +---+
/ |
+---+ master^
master -> | E |
+---+
git commit --amend
16Thursday, 19 June 14
Branching
+---+ +---+ +---+ +---+
branch -> | D +--+>+ C +--->+ B +--->+ A |
+---+ / +---+ +---+ +---+
/ |
+---+ master^
master -> | E |
+---+
git checkout -b
17Thursday, 19 June 14
Rebasing
We want to update the commit C with a new
commit message
+---+ +---+
rebased ->| D'+--->+ C'+
+---+ +---+

+---+ +---+  +---+ +---+
branch -> | D +--+>+ C +--->+ B +--->+ A |
+---+ / +---+ +---+ +---+
/ |
+---+ master^
master -> | E |
+---+
git rebase
18Thursday, 19 June 14
Merging
Merging introduces a bit more complexity to our model.
Instead of our history being a tree, it is now an acyclic
graph.
+---+
--+ X |
+---+/ +---+
| M |
+---+ +---+
--+ Y |
+---+
git merge
19Thursday, 19 June 14
Conclusion
20Thursday, 19 June 14
MERCI !!
21Thursday, 19 June 14

More Related Content

PPTX
d|Bootcamp Nairobi 2014 - Mapping Hands On
ODP
OSM Cycle Map
PDF
Bitcoin human talks grenoble November 2015
PDF
De git à la blockchain
PDF
React Native - Rex - HTGrenoble
PDF
React Fiber
PDF
Graphql
PDF
L'open source m'a tuer*
d|Bootcamp Nairobi 2014 - Mapping Hands On
OSM Cycle Map
Bitcoin human talks grenoble November 2015
De git à la blockchain
React Native - Rex - HTGrenoble
React Fiber
Graphql
L'open source m'a tuer*

Recently uploaded (20)

PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PPTX
L1 - Introduction to python Backend.pptx
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
history of c programming in notes for students .pptx
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Designing Intelligence for the Shop Floor.pdf
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
L1 - Introduction to python Backend.pptx
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Wondershare Filmora 15 Crack With Activation Key [2025
history of c programming in notes for students .pptx
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Complete Guide to Website Development in Malaysia for SMEs
Navsoft: AI-Powered Business Solutions & Custom Software Development
wealthsignaloriginal-com-DS-text-... (1).pdf
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
Digital Systems & Binary Numbers (comprehensive )
Why Generative AI is the Future of Content, Code & Creativity?
Design an Analysis of Algorithms I-SECS-1021-03
Designing Intelligence for the Shop Floor.pdf
Ad
Ad

Deeper look into_git

  • 1. A deeper look into HumanTalks Grenoble 11 Février 2013 1Thursday, 19 June 14
  • 2. About me @sabativi Grenoble Startup Digest Curator Developer at Sogilis 2Thursday, 19 June 14
  • 4. Decentralized version control like Git has a lot of momentum right now 4Thursday, 19 June 14
  • 5. STOP COMPARING SVN AND GIT 5Thursday, 19 June 14
  • 6. Talk about git as A purely functional data structure 6Thursday, 19 June 14
  • 8. A functional data structure is essentially an immutable data structure: its values never change. 8Thursday, 19 June 14
  • 9. Example : A simple list Let’s consider L: [ 3, 2, 1 ] Let’s do operation INSERT(4) at the front If L is mutable then L: [ 4, 3, 2, 1 ] 9Thursday, 19 June 14
  • 10. +---+ +---+ +---+ +---+ | 4 +--->+ 3 +--->+ 2 +--->+ 1 | +---+ +---+ +---+ +---+ | | new list original Immutable +---+ +---+ +---+ +---+ new list 1 -> | 4 +---+->+ 3 +--->+ 2 +--->+ 1 | +---+ / +---+ +---+ +---+ / | +---+/ original new list 2 -> | 9 + +---+ 10Thursday, 19 June 14
  • 11. Immutable +---+ +---+ updated list -> | 4 +--->+ 5 +----+ +---+ +---+ +---+ +---+ +-+-+ +---+ new list 1 -> | 4 +--->+ 3 +--->+ 2 +--->+ 1 | +---+ / +---+ +---+ +---+ / | +---+/ original new list 2 -> | 9 + +---+ 11Thursday, 19 June 14
  • 12. GIT VS PURELY FUNCTIONAL DATA To update our code base with new versions, keeping old versions available. Collaborating on a single code base without updates interfering with each other in an unpredicable way. Update data structure while keeping the old value of that data available. Updating a structure in one place without interfering with someone elses updates of that structure. 12Thursday, 19 June 14
  • 13. Git basically is a purely functional data structure, with a command line client that allows you to perform operations on it. 13Thursday, 19 June 14
  • 14. Let’s say we have a repository containing commits A, B and C in that order, in the master branch. We’ve told Git to store the entire state of our working directory three times during development. We can represent this state of development as the history [C,B,A] +---+ +---+ +---+ + C +--->+ B +--->+ A | +---+ +---+ +---+ | master 14Thursday, 19 June 14
  • 15. Commiting +---+ +---+ +---+ +---+ + D +--->+ C +--->+ B +--->+ A | +---+ +---+ +---+ +---+ | | master master^ git commit 15Thursday, 19 June 14
  • 16. Amending +---+ +---+ +---+ +---+ ef4d34 -> | D +--+>+ C +--->+ B +--->+ A | +---+ / +---+ +---+ +---+ / | +---+ master^ master -> | E | +---+ git commit --amend 16Thursday, 19 June 14
  • 17. Branching +---+ +---+ +---+ +---+ branch -> | D +--+>+ C +--->+ B +--->+ A | +---+ / +---+ +---+ +---+ / | +---+ master^ master -> | E | +---+ git checkout -b 17Thursday, 19 June 14
  • 18. Rebasing We want to update the commit C with a new commit message +---+ +---+ rebased ->| D'+--->+ C'+ +---+ +---+ +---+ +---+ +---+ +---+ branch -> | D +--+>+ C +--->+ B +--->+ A | +---+ / +---+ +---+ +---+ / | +---+ master^ master -> | E | +---+ git rebase 18Thursday, 19 June 14
  • 19. Merging Merging introduces a bit more complexity to our model. Instead of our history being a tree, it is now an acyclic graph. +---+ --+ X | +---+/ +---+ | M | +---+ +---+ --+ Y | +---+ git merge 19Thursday, 19 June 14