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
Low Level Git
Search
Hiroyuki Morita
December 05, 2013
Technology
0
94
Low Level Git
Hiroyuki Morita
December 05, 2013
Tweet
Share
More Decks by Hiroyuki Morita
See All by Hiroyuki Morita
Rubyistなら知っておきたい継承の話 / The inheritance for Rubyist
chiastolite
4
1.4k
esaを使って暗黙知を減らす取り組み
chiastolite
2
4.1k
git-inside
chiastolite
0
250
vagrant-itamae
chiastolite
1
1.5k
sushi for common people
chiastolite
0
330
Social Coding with GitHub
chiastolite
0
140
about Immutable Infrastructure
chiastolite
0
86
Other Decks in Technology
See All in Technology
【NGK2025S】動物園(PINTO_model_zoo)に遊びに行こう
kazuhitotakahashi
0
290
Docker Desktop で Docker を始めよう
zembutsu
PRO
0
200
TSのコードをRustで書き直した話
askua
3
400
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
1
16k
30分でわかる「リスクから学ぶKubernetesコンテナセキュリティ」/30min-k8s-container-sec
mochizuki875
3
460
2025年のARグラスの潮流
kotauchisunsun
0
870
2025年に挑戦したいこと
molmolken
0
200
色々なAWSサービス名の由来を調べてみた
iriikeita
0
120
Bring Your Own Container: When Containers Turn the Key to EDR Bypass/byoc-avtokyo2024
tkmru
0
880
FinJAWS_reinvent2024_recap_database
asahihidehiko
2
130
デジタルアイデンティティ技術 認可・ID連携・認証 応用 / 20250114-OIDF-J-EduWG-TechSWG
oidfj
2
720
2025年の挑戦 コーポレートエンジニアの技術広報/techpr5
nishiuma
0
150
Featured
See All Featured
It's Worth the Effort
3n
183
28k
Automating Front-end Workflow
addyosmani
1366
200k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
52k
How GitHub (no longer) Works
holman
312
140k
Adopting Sorbet at Scale
ufuk
74
9.2k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
Navigating Team Friction
lara
183
15k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
98
18k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Code Review Best Practice
trishagee
65
17k
Transcript
Low-level Git
Why Low-level Git • GitͷίΞͷ΄͏ͷ • ͳΜͱͳ͘Ͱ͍ͬͯͨίϚϯυ͕ Θ͔͖ͬͯͨ • ௐͯͨΒ͍Ζ͍Ζ͓͠Ζ͔ͬͨ
Start!!
Git Objects
> git init
> ls .git
> find .git/objects
create first commit
> ls .git/objects
3 Objects...? • Commit (f7a253e) • .git/objects/f7/a253ed90a5bb56d6cd8b3580485a7ae23acc88 • ??? (05934ea)
• .git/objects/05/934ea69782016b0fbaa7bf46d574cefb039958 • ??? (802992c) • .git/objects/80/2992c4220de19a90767f3000a79a31b98d0df7
> git cat-file -t {sha1}
Commit/Tree/Blob • Commit (f7a253e) • .git/objects/f7/a253ed90a5bb56d6cd8b3580485a7ae23acc88 • Tree (05934ea) •
.git/objects/05/934ea69782016b0fbaa7bf46d574cefb039958 • Blob (802992c) • .git/objects/80/2992c4220de19a90767f3000a79a31b98d0df7
Commit? Tree? Blob?
> git cat-file commit
Commit has... • Reference to ‘a’ Tree Object • Author
& Committer • Commit Message ! • (Reference(s) to parent)
> git ls-tree
Tree has... • Reference to Blob Objects • & File
name • & File Permission ! • (Reference to Tree Objects)
> git cat-file blob
Blob is... • commited file • don’t have a file
name
None
merge commit
commit has a parent
merge commit has parents
None
Question?
Reference
• alias to commits • ex) • HEAD • master
• some_branch • origin/master Reference?
Where is Branchs?
Where is the HEAD?
HEAD -> ref -> commit
None
Question?
Reference • ࣮ફ Git - ϨϕϧʹΔ Git • http://www.slideshare.net/youhei/ git-12695573
• ʲ༁ʳGitΛϘτϜΞοϓ͔Βཧղ͢ Δ • http://keijinsonyaban.blogspot.jp/2011/05/
appendix
example: rename
blob is not change