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
Kotlin Multiplatformのポテンシャル
recruitengineers
PRO
2
150
ドメイン駆動設計の実践により事業の成長スピードと保守性を両立するショッピングクーポン
lycorptech_jp
PRO
10
920
Bring Your Own Container: When Containers Turn the Key to EDR Bypass/byoc-avtokyo2024
tkmru
0
840
FODにおけるホーム画面編成のレコメンド
watarukudo
PRO
2
260
今年一年で頑張ること / What I will do my best this year
pauli
1
220
I could be Wrong!! - Learning from Agile Experts
kawaguti
PRO
8
3.3k
iPadOS18でフローティングタブバーを解除してみた
sansantech
PRO
1
130
Visual StudioとかIDE関連小ネタ話
kosmosebi
1
370
AWS re:Invent 2024 re:Cap Taipei (for Developer): New Launches that facilitate Developer Workflow and Continuous Innovation
dwchiang
0
160
機械学習を「社会実装」するということ 2025年版 / Social Implementation of Machine Learning 2025 Version
moepy_stats
4
890
2025年の挑戦 コーポレートエンジニアの技術広報/techpr5
nishiuma
0
140
月間60万ユーザーを抱える 個人開発サービス「Walica」の 技術スタック変遷
miyachin
1
130
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
240
For a Future-Friendly Web
brad_frost
176
9.5k
Docker and Python
trallard
43
3.2k
How STYLIGHT went responsive
nonsquared
96
5.3k
The Invisible Side of Design
smashingmag
299
50k
Visualization
eitanlees
146
15k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Being A Developer After 40
akosma
89
590k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Fireside Chat
paigeccino
34
3.1k
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