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
110
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.2k
git-inside
chiastolite
0
250
vagrant-itamae
chiastolite
1
1.6k
sushi for common people
chiastolite
0
340
Social Coding with GitHub
chiastolite
0
150
about Immutable Infrastructure
chiastolite
0
89
Other Decks in Technology
See All in Technology
スプリントレビューを効果的にするために
miholovesq
9
1.4k
RapidPen: AIエージェントによる高度なペネトレーションテスト自動化の研究開発
laysakura
1
360
ObsidianをLLM時代のナレッジベースに! クリッピング→Markdown→CLI連携の実践
srvhat09
7
8.5k
P2P通信の標準化 WebRTCを知ろう
faithandbrave
6
2.1k
AIを使っていい感じにE2Eテストを書けるようになるまで / Trying to Write Good E2E Tests with AI
katawara
2
970
ゼロから始めるSREの事業貢献 - 生成AI時代のSRE成長戦略と実践 / Starting SRE from Day One
shinyorke
PRO
0
210
今日からあなたもGeminiを好きになる
subaruhello
1
490
PHPからはじめるコンピュータアーキテクチャ / From Scripts to Silicon: A Journey Through the Layers of Computing
tomzoh
2
370
Digitization部 紹介資料
sansan33
PRO
1
4.6k
Figma Dev Mode MCP Serverを用いたUI開発
zoothezoo
1
290
今だから言えるセキュリティLT_Wordpress5.7.2未満を一斉アップデートせよ
cuebic9bic
2
200
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
7k
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.7k
Faster Mobile Websites
deanohume
308
31k
Raft: Consensus for Rubyists
vanstee
140
7k
It's Worth the Effort
3n
185
28k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Become a Pro
speakerdeck
PRO
29
5.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Agile that works and the tools we love
rasmusluckow
329
21k
RailsConf 2023
tenderlove
30
1.2k
Making Projects Easy
brettharned
116
6.3k
Art, The Web, and Tiny UX
lynnandtonic
301
21k
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