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
Dive into .git 日本語版
Search
NISHIO Hirokazu
May 24, 2012
Programming
190
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Dive into .git 日本語版
社内勉強会で使った資料の日本語版です
NISHIO Hirokazu
May 24, 2012
More Decks by NISHIO Hirokazu
See All by NISHIO Hirokazu
Dive into .git
nishio
2
110
Other Decks in Programming
See All in Programming
Performance Engineering for Everyone
elenatanasoiu
0
240
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
210
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
200
Oxlintのカスタムルールの現況
syumai
6
1.2k
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
800
act1-costs.pdf
sumedhbala
0
140
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
620
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
140
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
650
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
1k
ふつうのFeature Flag実践入門
irof
8
4.2k
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
610
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
450
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
350
A Modern Web Designer's Workflow
chriscoyier
698
190k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
550
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
55k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
320
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Accessibility Awareness
sabderemane
1
150
Transcript
%JWFJOUPHJU ඌହ
BCPVU w ͜ͷεϥΠυࣾษڧձͰؒͰ HJUͷதΛݟͯΈΔσϞΛ͢ΔͨΊʹ Ξϯνϣίͱͯ͠࡞ΒΕͨͷͰ͢ɻ w ϖʔδεϥΠυͰҹ͢ΔͱຕͰ ऩ·ΔͷͰͪΐ͏Ͳ͍͍͔ͱࢥ͍·͢ɻ
(JUΑ͘Θ͔ΒΜʁ w ʮ(JUͷ͍ΖΜͳ֓೦͕͍͠ʯʁ w ͡Ό͋֓೦ஔ͍ͱ͍ͯɺ ʮཧతʹͲ͏ͳͬͯΜͷʁʯ Λ֬ೝͯ͠ΈΑ͏ʂ w (JU͕ͲΜͳͷ͔Πϝʔδ͘͢͠ͳΕ͍
$ mkdir test $ cd test $ ls -a .
.. $ git init Initialized empty Git repository in .../test/.git/ HJUJOJUUFTUͰ0, छֻ͚ͳ͍ͨͩͷ ۭͷσΟϨΫτϦΛ࡞Δ ࣮ݧ༻ͷϦϙδτϦΛ࡞Δ ˡͰ͖ͨʂ
$ ls -a . .. .git ϦϙδτϦ͕Ͱ͖ͨʂ
தΛݟͯΈΑ͏ $ cd .git $ tree . |-- HEAD |--
config |-- description |-- hooks |-- info | `-- exclude |-- objects | |-- info | `-- pack `-- refs |-- heads `-- tags IPPLTͷதলུͨ͠
$ cd .. $ touch README $ git add README
$ git commit -m “initial commit” [master (root-commit) 4dd66d3] initial commit ίϛοτͨ͠Β Կ͕มΘΔʁ
PCKFDUT͕૿͑ͨ $ tree .git/objects .git/objects |-- 4d | `-- d66d3a32a66f3578317717ccfb18
|-- 54 | `-- 3b9bebdc6bd5c4b22136034a95dd |-- e6 | `-- 9de29bb2d1d6434b8b29ae775ad8 |-- info `-- pack ͍ϑΝΠϧ໊ͷඌলུͨ͠ ଞʹมΘΔ෦͕͋Δ͕ࠓճׂѪ
$ cat > show.py #!/usr/bin/env python import sys import zlib
data = file(sys.argv[1], "rb").read() data = zlib.decompress(data) print repr(data) தΛݟͯΈΑ͏ʂ දࣔεΫϦϓτΛ࡞Δ ҎԼͰTIPXQZɻDINPE YΛΕͣʹ
$PNNJUͷத $ ./show.py .git/objects/4d/d6... 'commit 201\x00 tree 543b...\n author NISHIO
Hirokazu <...> 1337655529 +0900\n committer NISHIO Hirokazu <...> 1337655529 +0900\n \n initial commit\n' దʹվߦΛೖΕͨ USFFCʹ ϋογϡίϛοτ࣌ͷϝοηʔδʹදࣔ͞Ε͍ͯΔ
5SFFͷத $ ./show.py 54/3b... 'tree 34\x00 100644 README\x00 \xe6\x9d\xe2\x9b...' దʹվߦΛೖΕͨ
FCʹ
#MPCͷத $ ./show.py e6/9d... 'blob 0\x00' ͜Ε͕3&"%.&ͷத ࠓۭͳͷͰαΠζ͕ aYͷޙʹԿͳ͍
ϑΝΠϧ໊ $ python -c “import hashlib; hashlib.sha1('blob 0\x00').hexdigest()” 'e69de29b...' ࣮தͷ4)"ϋογϡʂ
·ͱΊ w ϦϙδτϦHJUͷதʹೖ͍ͬͯΔ w HJUPCKFDUTʹɺTIBϋογϡΛ໊લʹ͠ɺ Λ[MJCͰѹॖͯ͠ɺ͍Ζ͍Ζೖ͍ͬͯΔ w ʮ͍Ζ͍ΖʯͷதʹDPNNJUΦϒδΣΫτɺ USFFΦϒδΣΫτɺCMPCΦϒδΣΫτ w
ࠓճUBHSFGTͷׂѪ ࣍ճʁ
ͬͯΈΑ͏ w 3&"%.&Λฤूͯ͠Ͳ͏มΘΔ͔؍͠Α͏ w ৽͍͠DPNNJUΦϒδΣΫτʹ ʮQBSFOUϋογϡʯͷߦ͕͋Δ w ৽͍͠CMPCʹ3&"%.&ͷ༰͕ೖ͍ͬͯΔ w ৽͍͠ϑΝΠϧΛՃͯ͠ΈΑ͏ɻ5SFFͲ͏
มΘΔʁ w ϑΝΠϧʹهͨ͠ΒʁCMPCࠩʁશମʁ
None
͓·͚ w HJUTIPXGPSNBUSBX͕ͥΜͥΜSBX ͡Όͳ͍ͯ͘ͷʹͳΒͳ͍
தΛݟͯΈΑ͏ $ git show --format=raw 4dd6 commit 4dd66d3a32a66f3578317717ccfb1876d43034ea tree 543b9bebdc6bd5c4b22136034a95dd097a57d3dd
author NISHIO Hirokazu <...> 1337138246 +0900 committer NISHIO Hirokazu <...> 1337138246 +0900 initial commit diff --git a/README b/README new file mode 100644 index 0000000..e69de29 ϝʔϧΞυϨεলུͨ͠
5SFFͷத $ git show --format=raw 543b tree 543b README
#MPCͷத Կදࣔ͞Εͳ͍ $ git show --format=raw e69d
͓͔͍͠ ͜Εͷத͕FE ͩͱ͍͏ใͲ͜ʁ $ git show --format=raw 543b tree 543b
README ͱ͍͏Θ͚ͰදࣔεΫϦϓτΛ࡞ͬͨ
2" w 2εΫϦϓτ࡞Βͳͯ͘HVO[JQͱ͔Ͱղౚ͢ Εྑ͍ͷͰʁ w "[MJCͰѹॖ͞Ε͍ͯΔ͕ɺ[JQϑΝΠϧͱͯ͠ WBMJEͳϑΥʔϚοτʹͳ͍ͬͯͳ͍ͷͰղౚͰ ͖ͳ͔ͬͨɻͬ͠ͱखܰͳํ๏͕͋Εڭ͑ ͯԼ͍͞ɻ