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
なぜGitでバイナリファイルをおいてはいけないかGitの内部構造から考える
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Takeshi Kondo
September 05, 2017
Technology
3.1k
0
Share
なぜGitでバイナリファイルをおいてはいけないかGitの内部構造から考える
Takeshi Kondo
September 05, 2017
More Decks by Takeshi Kondo
See All by Takeshi Kondo
SREの知識地図 - 第2章の紹介 - / Knowledge Map of SRE – Introduction to Chapter 2 –
chaspy
0
79
SRE NEXT CfP チームが語る 聞きたくなるプロポーザルとは / Proposals by the SRE NEXT CfP Team that are sure to be accepted
chaspy
2
1.7k
Slack Platform(Deno) での RAG 実装 - LangChain(js) を使ってみた / rag-implementation-on-slack-platform-deno-experimenting-with-langchain-js
chaspy
0
290
SRE の考えをマネジメントに活かす / applying SRE ideas to management
chaspy
7
8.2k
RAGの簡易評価によるフィードバックサイクル実践 / Feedback cycle practice through simplified assessment of RAGs
chaspy
2
5.9k
定量データと定性評価を用いた技術戦略の組織的実践 / Systematic implementation of technology strategies using quantitative data and qualitative evaluation
chaspy
9
2.2k
エンジニアブランディングチームの KPI / KPI's of engineer branding team
chaspy
2
2.5k
「SLO Review」今やるならこうする / If I had to do the "SLO Review" again
chaspy
3
2.3k
開発者とともに作る Site Reliability Engineering / SREing with Developers
chaspy
10
8.9k
Other Decks in Technology
See All in Technology
20260423_執筆の工夫と裏側 技術書の企画から刊行まで / From the planning to the publication of technical book
nash_efp
3
610
Pure Intonation on Browser: Building a Sequencer with Ruby
nagachika
0
170
Chasing Real-Time Observability for CRuby
whitegreen
0
280
今年注目する!データ分析プラットフォームでのAIの活用
nayuts
0
170
バイブコーディングで3倍早く⚪⚪を作ってみた
samakada
0
180
巨大プラットフォームを進化させる「第3のROI」
recruitengineers
PRO
2
1.4k
Claude Code を安全に使おう勉強会 / Claude Code Security Basics
masahirokawahara
12
38k
ハーネスエンジニアリングの概要と設計思想
sergicalsix
9
5.5k
AWS Agent Registry の基礎・概要を理解する/aws-agent-registry-intro
ren8k
3
410
Building a Standalone Programming Environment
harukasan
PRO
1
100
Hacobu Tech Deck
hacobu
PRO
0
130
「AIに部下10人」を3ヶ月運用してわかった、生成AI駆動開発のリアル
yoheinabe777
0
110
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
First, design no harm
axbom
PRO
2
1.2k
sira's awesome portfolio website redesign presentation
elsirapls
0
220
How STYLIGHT went responsive
nonsquared
100
6.1k
The Pragmatic Product Professional
lauravandoore
37
7.2k
Are puppies a ranking factor?
jonoalderson
1
3.3k
Chasing Engaging Ingredients in Design
codingconduct
0
170
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
360
How to train your dragon (web standard)
notwaldorf
97
6.6k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
310
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
530
Transcript
ͳͥGitͰόΠφϦϑΝΠ ϧΛ͓͍͍͚ͯͳ͍͔ Gitͷ෦ߏ͔Βߟ͑Δ 2017/08/31 kondo takeshi
Git͓͡͞Μ
΅͘ʮ͜Εยํ͍Βͳ͘ͳ͍ʁ ফͦ͏Αʯ ͱ͋ΔHJUϦϙδτϦ @QBUDI @QBUDI
ޙഐ͘Μʮ͑ʔʁফ͢ΜͰ͢ ͔ʔʁԿ͔ා͍ͬ͢oldͰ͍͍ Ͱ͔͢ʔʁʯ
΅͘ʮGit͕֮͑ͯͯ͘ΕΔ͔ Βʂʂʂʂʂʂoldͱ͔Ί Ζʂʂʂʂʂʂʂʂʂʂʯ
ͳΜͱ͔खॱॻ_draft.docx
΅͘ʮdraftϒϥϯνͬͯ ΕΑʂʂʂʂʂͬ͞͞ͱ rename͠Ζʂʂʂʂʂʯ
νʔϜͷGitྗ্͕՝ • GitϑΝΠϧαʔό͡Όͳ͍ʂʂʂ • masterpushΊΖʂʂʂ • खॱॻϨϏϡʔϓϩηεΛMRͰΓ͍ͨɻɻ • ->ͭ·Γdiff͕͏·͘ग़ͳ͍WordΛ͜Ζ͢
$ git init > Initialized empty Git repository in /Users/take/
gitlab/.git/
$ ls .git > HEAD config description hooks info objects
refs
.gitɺ͋Γ·͢Ͷʁ
.gitɺ͋Γ·͢Α
.git • Gitͯ͢ͷཧใΛ.gitҎԼʹू • .gitͷதΛݟ͍ͯ͘͜ͱͰɺͲ͏ͬͯόʔ δϣϯཧΛ࣮ݱ͍͔ͯ͘͠ݟ͍ͯ͘
gitͷΦϒδΣΫτ CMPC ϑΝΠϧͷσʔλ USFF CMPCͷࢀরͱɺ ֊ͷσΟϨΫτϦใ DPNNJU มߋ࣌ͷϝλσʔλͱɺ USFFͷࢀর UBH
DPNNJUͷࢀর
gitͷΦϒδΣΫτ GitӳจϚχϡΞϧΛಡΉͨΊͷ༧උࣝ http://tokkonopapa.github.io/blog/2012/01/17/prior-knowledge-for-git-manual/
ςΩετϑΝΠϧͷ߹ $ echo "hello git" > hello_git.txt $ git add
hello_git.txt $ git commit -m "hello git” [master (root-commit) aaa6ce7] hello git 1 file changed, 1 insertion(+) create mode 100644 git_test/hello_git.txt > Ҏ߱σϞͰʂ
όΠφϦϑΝΠϧͷ߹ ը૾ϑΝΠϧͷมߋ > Ҏ߱σϞͰʂ https://pixlr.com/editor/
εφοϓγϣοτΜʂ ࠩཧ͡Όͳ͍Μʂ
git gc
git-gcͱpackfile • git-gcʹΑΓطଘͷΦϒδΣΫτআ͞Εɺ pack-*.idxͱpack-*.packϑΝΠϧ͕ੜ • ͨͿΜ͜͜Ͱdeltaѹॖͯ͠Δ
େ༰ྔϑΝΠϧΛߋ৽ͯ͠ΈΔ $ sec 1 10000000 > sec.txt $ git gc
Counting objects: 18, done. Delta compression using up to 4 threads. Compressing objects: 100% (14/14), done. Writing objects: 100% (18/18), done. Total 18 (delta 3), reused 11 (delta 0) > Ҏ߱σϞͰʂ
όΠφϦϑΝΠϧͷԿ͕μϝʁ • ୯ʹdiff͕ݟΕͳ͍ • merge࣌ʹconflict͢Δͱࢮ͵ • ͕ࠩଟ͘ग़ΔՄೳੑ͕͋ΔͷͰɺpackʹΑ Δѹॖޮ͕ѱ͍
·ͱΊ • ຊʹ͍͚ͯ͠ͳ͍ͷʮڊେόΠφϧϑΝΠϧʯ ͷadd • -> Git LFSͲ͏ͧ • commitεφοϓγϣοτ(blog)Λੜ͠ɺpackͰ
ࠩอଘʹΑΔѹॖ • ͦΕҎ֎શͯࢀরͷϦϨʔ
͓·͚ɿWordόΠφϦͱ͍ ͏Θ͚Ͱͳ͍ • Wordͷதzip͞Εͨxml • ͔ͩΒgitͰdiffͱΔͱԿ͔͠Βݟ͑Δ • ࢀߟɿWord͞Μࠓ͓͔ͭΕͰ͢ • http://qiita.com/kaityo256/items/
c15889dbb7acb2632c6e
Reference • ΤϯδχΞͷͨΊͷGitͷڭՊॻʦ্ڃฤʧ Git෦ͷΈΛཧղ͢Δ • https://www.amazon.co.jp/exec/obidos/ASIN/B01AAIN85K/ takeshe11-22/ • ʮΤϯδχΞͷͨΊͷgitڭՊॻʯ͔Βgitͷ෦ߏΛֶͿɹ࣮ફฤͦͷ1 •
http://take-she12.hatenablog.com/entry/2017/08/10/120000 • ʮΤϯδχΞͷͨΊͷgitڭՊॻʯ͔Βgitͷ෦ߏΛֶͿɹ࣮ફฤͦͷ2 • http://take-she12.hatenablog.com/entry/2017/08/12/120000