Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
GIT: Understanding Git architecture and object ...
Search
Pierre GOUDJO
December 30, 2021
Technology
0
260
GIT: Understanding Git architecture and object model
Explaining the architecture and object model of GIT
Pierre GOUDJO
December 30, 2021
Tweet
Share
More Decks by Pierre GOUDJO
See All by Pierre GOUDJO
Simplicity matters
pierregoudjo
0
59
Always available workspaces: Dotfiles, Github and other shenanigans
pierregoudjo
0
48
Amazon Virtual Private Cloud
pierregoudjo
0
72
Service Discovery: Fundamentals
pierregoudjo
0
78
Relational Databases on AWS: Amazon RDS and Aurora
pierregoudjo
0
95
Property-based testing: The lazy programmer's guide to writing thousands of tests
pierregoudjo
0
97
Object storage: An exploration of AWS S3
pierregoudjo
0
60
Load Balancing: A strategy for scalable internet applications
pierregoudjo
0
88
Boring Technologies
pierregoudjo
0
50
Other Decks in Technology
See All in Technology
生成AI時代のデータ基盤設計〜ペースレイヤリングで実現する高速開発と持続性〜 / Levtech Meetup_Session_2
sansan_randd
1
150
20250913_JAWS_sysad_kobe
takuyay0ne
2
160
Evolución del razonamiento matemático de GPT-4.1 a GPT-5 - Data Aventura Summit 2025 & VSCode DevDays
lauchacarro
0
170
Platform開発が先行する Platform Engineeringの違和感
kintotechdev
4
550
20250910_障害注入から効率的復旧へ_カオスエンジニアリング_生成AIで考えるAWS障害対応.pdf
sh_fk2
3
240
20250903_1つのAWSアカウントに複数システムがある環境におけるアクセス制御をABACで実現.pdf
yhana
3
550
ハードウェアとソフトウェアをつなぐ全てを内製している企業の E2E テストの作り方 / How to create E2E tests for a company that builds everything connecting hardware and software in-house
bitkey
PRO
1
120
なぜスクラムはこうなったのか?歴史が教えてくれたこと/Shall we explore the roots of Scrum
sanogemaru
5
1.6k
Obsidian応用活用術
onikun94
2
480
現場で効くClaude Code ─ 最新動向と企業導入
takaakikakei
1
240
DDD集約とサービスコンテキスト境界との関係性
pandayumi
3
280
AIエージェント開発用SDKとローカルLLMをLINE Botと組み合わせてみた / LINEを使ったLT大会 #14
you
PRO
0
110
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.8k
A Modern Web Designer's Workflow
chriscoyier
696
190k
Site-Speed That Sticks
csswizardry
10
810
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
Six Lessons from altMBA
skipperchong
28
4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
Transcript
Pierre Goudjo Git Understanding Git architecture and object model
None
None
Seriously, what is Git?
Git is a Version Control System
None
Git is a distributed Version Control System
A CENTRALIZED VCS
A DISTRIBUTED VCS
A Distributed VCS (in practice)
Each repository contains all the commits and history locally
None
Just like it sounds, a "remote" is a repo outside
your environment. Remotes
A Distributed VCS (in practice)
Cloning creates a remote called "origin" Remotes ~$ git clone
http://some.repo.com someDirectory ~$ git branch -a * master remotes/origin/master
Where is the remote? Remotes ~$ git remote -v origin
http://some.repo.com (fetch) origin http://some.repo.com (push)
A local branch may “track” a remote URL Remotes ~$
git branch -vv * master b956c45 [origin/master] Initial commit some-local-branch a74b295 Implemented that cool feature
Tracking Remotes
Tracking Remotes ~$ git checkout -b new-feature
Tracking Remotes ~$ git branch —set-upstream-to=origin/new-feature ~$ git checkout -b
new-feature
Tracking Remotes ~$ git branch —set-upstream-to=origin/new-feature ~$ git branch -u
origin/new-feature ~$ git checkout -b new-feature
Tracking Remotes ~$ git branch —set-upstream-to=origin/new-feature ~$ git branch -u
origin/new-feature ~$ git push -u origin/new-feature ~$ git checkout -b new-feature
Tracking Remotes ~$ git branch —set-upstream-to=origin/new-feature ~$ git branch -u
origin/new-feature ~$ git push -u origin/new-feature ~$ git checkout -b new-feature ~$ git checkout existing-branch-on-remote
Tracking Remotes ~$ git branch —set-upstream-to=origin/new-feature ~$ git branch -u
origin/new-feature ~$ git push -u origin/new-feature ~$ git branch -vv master b956c45 [origin/master] Initial commit new-feature b956c45 [origin/new-feature] Initial commit * existing-branch-on-remote b956c45 [origin/existing-branch-on-remote] Another commit some-local-branch a74b295 Implemented that cool feature ~$ git checkout -b new-feature ~$ git checkout existing-branch-on-remote
A Distributed VCS (in practice)
What about other repos? How this is distributed?
A DISTRIBUTED VCS
Other Remotes Remotes ~$ git remote add another http://another.repo.fr ~$
git remote -v origin http://some.repo.com (fetch) origin http://some.repo.com (push) another http://another.repo.fr (fetch) another http://another.repo.fr (push)
None
What about the version control part?
The major di ff erence between Git and other VCS
is the way they think about data
File states in Git
The staging area
CVS, SVN and others think of the information they store
as a set of data and the changes made to each fi le over time Δ-based version control
Every time you commit Git takes a picture of what
all your fi les look like at that moment Snapshot-based version control
Git store snapshots of directories and fi les Tree and
Blob Objects
Git commit structure
Commit objects parents
HEAD pointer
Branches
git branch testing Branch
git checkout testing Branch change in Git
Tagging
git reset —hard Discard commits
git reset —hard Discard commits
git branch <branch>; git checkout <branch>; git checkout -b <branch>
Commits and branches
git branch <branch>; git checkout <branch>; git checkout -b <branch>
Commits and branches
git merge <branch> ; git merge <branch> — ff -only
Fast-forward merge
git merge <branch> ; git merge <branch> — ff -only
Fast-forward merge
git merge <branch>; git merge <branch> —no- f Merge commits
git merge <branch>; git merge <branch> —no- f Merge commits
Multiple merge commits
git rebase <branch> Rebasing
git rebase <branch> Rebasing
Fast forwarding rebased branch
git cherry-pick <commit_hash> Cherry-picking
git cherry-pick <commit_hash> Cherry-picking
None
@pierregoudjo The End