Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Dive into .git 日本語版
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
カツオ、ご期待ください
suneo3476
0
190
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
JIS keyboard support in Omarchy
lef237
0
110
Agents on Rails - Rails at Scale 2026
irinanazarova
0
560
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
32k
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
550
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2k
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
golang-bob.pdf
iwatsukayura
0
130
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
590
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
Technical Leadership for Architectural Decision Making
baasie
3
600
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
480
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
Tell your own story through comics
letsgokoyo
1
1.1k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
500
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
59k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
640
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
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ͳϑΥʔϚοτʹͳ͍ͬͯͳ͍ͷͰղౚͰ ͖ͳ͔ͬͨɻͬ͠ͱखܰͳํ๏͕͋Εڭ͑ ͯԼ͍͞ɻ