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
内部構造から学ぶGit
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
A1
April 24, 2017
Programming
340
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
内部構造から学ぶGit
社内勉強会資料
A1
April 24, 2017
More Decks by A1
See All by A1
プロダクトのことは何でもNotebookLMに聞こう / NotebookLM for on boarding
eichisanden
2
160
Kotlin2でdataクラスの copyメソッドを禁止する/Data class copy function to have the same visibility as constructor
eichisanden
1
1.1k
短納期でローンチした新サービスをJavaで開発した話/launched new service using Java
eichisanden
6
4.4k
トラブルゼロで乗り切ったTypeScript移行/trouble-free TypeScript migration
eichisanden
3
3.8k
スクラム開発チームをLessでスケールさせた話/Scaling Scrum team with Less
eichisanden
0
6.4k
息の長いサービスのフロントエンドを少し改善する営み/frontend-improvement
eichisanden
3
3.2k
実はGitLabで使えるmermaid.js/gitlab-mermaid.js
eichisanden
1
870
既存 Web アプリケーションへの React.js 適用/react for web application
eichisanden
0
2k
楽楽明細でやってるChatOps/Development with ChatOps
eichisanden
0
1.3k
Other Decks in Programming
See All in Programming
Webの地図
yosuke_furukawa
PRO
6
5k
Verilogで学ぶCPU自作入門.pdf
uyuki234
8
4k
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
540
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.4k
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.3k
すこし踏み込む CancellationToken
htkym
2
1.6k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
490
Heart of Swift Concurrency
koher
0
1.2k
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
9.7k
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
110
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
610
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
450
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
1
590
Test your architecture with Archunit
thirion
2
2.4k
A designer walks into a library…
pauljervisheath
211
25k
We Are The Robots
honzajavorek
0
380
Between Models and Reality
mayunak
4
480
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
270
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
860
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
460
Making the Leap to Tech Lead
cromwellryan
135
10k
Claude Code のすすめ
schroneko
67
230k
Ruling the World: When Life Gets Gamed
codingconduct
0
380
Transcript
෦ߏ͔ΒֶͿGit @eichisanden
f5aecbff04f484dcf74e14f c6961da0a8b6d43ad
Gitͱ͍͑ɺSha1ϋογϡ40ܻ
commit ff86faf2fa02bc21933c9e1dcc75c8d81b3e104a Merge: 8f8d0ec 552a736 Author: Taro <
[email protected]
> Date: Wed
Aug 19 14:49:37 2015 -0700 Bugfix xxx commit 8f8d0ecfde871144ae839876039fe4e8fed75a9c Author: Taro <
[email protected]
> Date: Wed Aug 19 14:46:09 2015 -0700 Refactoring xxx commit 011710a315a5e4157e882880fe77798f8d4adde0 Merge: 8c9155e 09bb652 Author: Taro <
[email protected]
> Date: Wed Aug 19 14:48:56 2015 -0700 Merge branch 'todo' git logͷ݁Ռ
Q. ԿͰsha1ϋογϡͳͷʁ svnΈ͍ͨʹγʔέϯεͷํ͕ྑ͘ͳ ͘ͳ͍ʁ
A. GitDVCSʢࢄܕόʔ δϣϯཧγεςϜʣ͔ͩΒ
ϦϏδϣϯ1ͬͯԿΑ தԝϦϙδτϦ "͞ΜͷϩʔΧϧ #͞ΜͷϩʔΧϧ →ࢄڥશମͰϢχʔΫͰ͋Δඞཁ͕͋Δ
ࢄܕ͡Όͳ͔ͬͨͱͯ͠ɺ Gitίϛοτͷྺ࢙ͷվมʹ༰ ͳͷͰɺγʔέϯεNo.߹Θͳ͍
Q. ຖ40ܻࢦఆ͠ͳ͍ͱμϝͳ ͷʁ
A. ඃΒͳ͚Εɺઌ಄4ܻͰOK େ͖ΊͷϦϙδτϦͰ6ܻࢦఆͰ͍͚Δ
Q. ϋογϡͲ͏ܾͬͯ·Δ ͷʁ
A. ίϛοτͷ༰Ͱܾ·Δ
Q. ϋογϡ͕ඃΔ͡Όͳ͍ʁ
A. ඃΔʢՄೳੑ͋Δʣ
ͰিಥͷՄೳੑҰஹೋઍԯͷͦ ͷ·ͨҰஹഒ
ٿ্ͷཻ࠭ͷઍೋඦഒͷ֬ ʙPro Git 6ষΑΓʙ
ී௨ʹ͏ʹؾʹ͢Δඞཁͳ͍
gitͷΦϒδΣΫτͷछྨ commit tree blob tagʢࠓճ͠·ͤΜʣ
Πϝʔδਤ HJUMPHͰΈͯͨͷ ͜͜ͷҰཡ
Πϝʔδਤ ଞͷΦϒδΣΫτҰҙͳϋο γϡΛ͍࣋ͬͯΔ
git cat-file ίϚϯυͰΦϒδΣΫ τͷதΛ͍ͯΈΑ͏
commitΦϒδΣΫτ $ git cat-file -p ff86fa tree c95970c3507b89fe43181df983f73c8f1db262fb parent 8f8d0ecfde871144ae839876039fe4e8fed75a9c
parent 552a736de775994570570a0514f24e32686afbe0 author Taro <
[email protected]
> 1440020977 -0700 committer Taro <
[email protected]
> 1440020977 -0700 Bugfix: xxx
treeΦϒδΣΫτ $ git cat-file -p c95970 100644 blob 5e98806c6cc246acef5f539ae191710a0c06ad3f .gitattributes
100644 blob a685ec1fb0ca49607431a65f1ccf035bb9b95a3a .gitignore 100644 blob ece2951a2b1e1cdd611c7dc371e50501d416d1f8 .mailmap 100644 blob 536e55524db72bd2acf175208aef4f3dfc148d42 COPYING 040000 tree dbb0cc4bf1e93167118aa39e57c8b7efa9113598 Documentation 100755 blob fc45283501a3b004edabc55781b486b37509dd37 GIT-VERSION-GEN ϑΝΠϧͱϑΥϧμͷใΛ อ͍࣋ͯ͠Δɻ
blobΦϒδΣΫτ $ git cat-file -p 4223f1 package main import “fmt”
fun main() { fmt.Printf(“Hello World”) } ಡΊΔʂಡΊΔͧʂʂ
Q. GitͷΦϒδΣΫτͲ͜ʹอଘ ͞Ε͍ͯΔͷʁ
A. .gitϑΥϧμͷத
GitͷϑΥϧμߏ .git !"" HEAD ←HEAD͕Ͳ͜Λࢦ͍ࣔͯ͠͠Δ !"" config ←จࣈ௨ΓઃఆϑΝΠϧ !"" description
!"" hooks ←hookεΫϦϓτ !"" info # %"" exclude !"" objects ←͜͜ʹΦϒδΣΫτ͕ೖ͍ͬͯΔ # !"" 22 # # %"" 62de0c121f22df8e78f5a37d6e114fd322c0b0 # !"" 3e # # %"" 2799e0729c58acb86bb40f19c8cb4b2b4f8e96 # !"" 46 # # %"" d2987acc571a47f9e69b585eb833f6e903b2cc # !"" 6c # # %"" c84aae39643fdb94d1699b74b07e2c6500cbaf # !"" info # %"" pack %"" refs !"" heads %"" tags 8 directories, 13 files
Q. શ͘ಉ͡༰ͷϑΝΠϧ͕͋ͬͨ ΒΦϒδΣΫτͲͷΑ͏ʹ֨ೲ͞ ΕΔͷʁ
ಉ͡༰ͷϑΝΠϧΛ࡞ͯ͠ΈΔ $ echo "hoge" > a.txt $ echo "hoge" >
b.txt $ git add . $ git commit -m 'add a.txt and b.txt' [master (root-commit) 6cc84aa] add a.txt and b.txt 2 files changed, 2 insertions(+) create mode 100644 a.txt create mode 100644 b.txt $ git cat-file -p 6cc84aa tree f5aecbff04f484dcf74e14fc6961da0a8b6d43ad author eichisanden <
[email protected]
> 1440425753 +0900 committer eichisanden <
[email protected]
> 1440425753 +0900 add a.txt and b.txt $ git cat-file -p f5aecbff 100644 blob 2262de0c121f22df8e78f5a37d6e114fd322c0b0 a.txt 100644 blob 2262de0c121f22df8e78f5a37d6e114fd322c0b0 b.txt $ git cat-file -p 2262 hoge ϋογϡಉ͡ͳͷͰແବͳΦ ϒδΣΫτ࡞ΒΕͳ͍ʂ
ϑΝΠϧ໊͕ҧ͓͏͕ɺ อଘϑΥϧμ͕ҧ͓͏͕ɺ ༰͕ಉ͡ͳΒಉ͡ϋογϡʹͳΔʂ
ϋογϡ͕িಥͨ͠ͱ͖Git ಉ͡ಈ͖Λ͢Δͣ ʢલड़ͷ௨Γɺى͜Γಘͳ͍Ͱ͕͢ʣ
Q. ϑΝΠϧΛࠩͰཧ͠ͳ͍ͱɺ ͑Β͍༰ྔΛ৯͏ͷͰʁ
͔֬ʹcommit(git add)ͨ͠ ޙ༰ྔΛ৯͏
ͨͩɺGCͰpackfileʹҠಈ͞Ε༰ྔݮΔͷͰେৎ .git !"" HEAD ←HEAD͕Ͳ͜Λࢦ͍ࣔͯ͠͠Δ !"" config ←จࣈ௨ΓઃఆϑΝΠϧ !"" description
!"" hooks ←hookεΫϦϓτ !"" info # %"" exclude !"" objects # !"" 22 # # %"" 62de0c121f22df8e78f5a37d6e114fd322c0b0 # !"" 3e # # %"" 2799e0729c58acb86bb40f19c8cb4b2b4f8e96 # !"" 46 # # %"" d2987acc571a47f9e69b585eb833f6e903b2cc # !"" 6c # # %"" c84aae39643fdb94d1699b74b07e2c6500cbaf # !"" info # %"" pack ←͜͜ʹҠಈ͞ΕΔ %"" refs !"" heads %"" tags 8 directories, 13 files
໌ࣔతʹgit gcίϚϯυΛଧͨͳͯ͘ɺ git pushͱ͔ͷλΠϛϯάͰউखʹͬ ͯ͘ΕΔͷͰɺීஈҙࣝ͠ͳͯ͘OK
෦ߏΛΔͱgitΛ͏ͷ ָ͕͘͠ͳΔ͔
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠