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
The 7 Habits of Git
Search
Sotaro Karasawa
August 27, 2013
Technology
15
100k
The 7 Habits of Git
Git 7つの心得
http://atnd.org/events/42085
Sotaro Karasawa
August 27, 2013
Tweet
Share
More Decks by Sotaro Karasawa
See All by Sotaro Karasawa
P2B Haus法人サポータープランのご提案
sotarok
0
4
ソフトウェアxスタートアップから見た飲食と配送の世界 / The World of Food Deliverlies and Restaurant Businesses from a Software and Startup Perspective
sotarok
2
1.2k
CTO 3度目の正直 / My 3rd CTO Career
sotarok
21
10k
Introduction to the Corporate Solutions Engineering at MTC2018
sotarok
1
36k
Mercari meetup for Corporate Engineering #1 / What is "Corporate Engineering"?
sotarok
2
2.3k
Markdown and WYSIWYG
sotarok
1
5.9k
20 Jan 2017 / Moving Beyond Borders - Mercari DAY
sotarok
8
15k
PHPBLT の心得 / PHPBLT #5 @ペパボ
sotarok
5
3.4k
Wiki についての今昔物語 / Crowi
sotarok
5
14k
Other Decks in Technology
See All in Technology
C++26 エラー性動作
faithandbrave
2
680
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
370
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.2k
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
1
110
フロントエンド設計にモブ設計を導入してみた / 20241212_cloudsign_TechFrontMeetup
bengo4com
0
1.9k
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
240
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
440
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
190
podman_update_2024-12
orimanabu
1
260
統計データで2024年の クラウド・インフラ動向を眺める
ysknsid25
2
840
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
How GitHub (no longer) Works
holman
311
140k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Cost Of JavaScript in 2023
addyosmani
45
7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.2k
Transcript
Crocos, Inc. Sotaro Karasawa @sotarok http://facebook.com/sotarok (JUͭͷ৺ߏ͑ #get_great_git @ (FU(SFBU(JUCZ2JJUB
ࣗݾհ 4PUBSP,BSBTBXB!TPUBSPL ฑ૱ଠ IUUQRJJUBDPNTPUBSPL גࣜձࣾΫϩίε$SPDPT*OD 1)1 (JU 3FE#VMM
(3&&Ͱ47/ˠ(JUҠߦͷϓϩδΣΫτɻ։ൃϑϩʔΛ جຊ่ͣ͞(JUͷྑ͍ॴΛ׆͔ͤΔϑϩʔ࡞Γ HJUEBJMZϦϦʔε $SPDPTͰ(*5-"#ಋೖ 1VMM3FRVFTUϕʔεͷ։ൃϑϩʔ (JU)VC
1SJWBUF ʹҠߦ (JUʹؔͯ͠Կ͔͍͏͜ͱ͕͋Δͱ͢Ε
ࠓ͢͜ͱʮ৺ߏ͑ʯ ରऀ (JUॳʙதڃऀ 1VMM3FRVFTUͦΖͦΖ͔ͳͷਓ
ଉΛٵ͏Α͏ʹHJUTUBUVT
-JOVYͰ ͳΜ͔MTͬͯଧͪ·͢ΑͶ Ջͳ࣌
ͦͷؾ࣋Ͱ HJUTUBUVT
͋ͱEJGG HJUEJGG HJUEJGGDBDIFE
ͱʹ͔͘DPNNJUલʹ HJUEJGGDBDIFE
HJUDPNNJUB͏ͳ ͻͱͭͻͱͭ BEE͢Δͱྑ͍Ͱ͢ 47/͔Βདྷͨਓ͕ Αͬͯ͘Δ͖͕͢Δ
ͳΜͳΒBMJBTʹ BMJBTHTUHJUTUBUVT
ଉΛు͘Α͏ʹHJUCSBODI
1VMM1VTI.FSHF3FCBTF ͯ͢ͷૢ࡞Ͱ CSBODIΛҙࣝ͠·͠ΐ͏ʂ
Α͋͘Δ(JUࣄނτοϓ ʮ͍͢·ͤΜɺ ɹҧ͏ϒϥϯνʹQVTIͪ͠Ό ͍·ͨ͠ʯ
ͳΜͳΒBMJBTʹ BMJBTHCHJUCSBODIB
ͪͳΈʹ ϓϩϯϓτʹදࣔͤͯ͞Δ
ͪͳΈʹ ϓϩϯϓτʹදࣔͤͯ͞Δ τϥϒΔਓ ͍͍ͩͨݟͯ·ͤΜʂ ༉அېʂ
NFSHF SFCBTFΛཧղ͢Δ
େࡶʹݴͬͯ Git ษڧձ@ສ༿ #3 ʹߦ͖ͬͯͨ http://gom.hatenablog.com/entry/20090522/1243011416 ૬खͷมߋΛଚॏ͠·͠ΐ͏ NFSHF͕ࣗओମɻࣗͷΛݩʹ૬खͷมߋΛద༻͢Δ SFCBTF૬ख͕ओମɻ૬खͷΛݩʹࣗͷมߋΛద༻͢Δ
NFSHF͕ࣗओମ SFCBTF૬ख͕ओମ
NFSHF ࣗ ૬ख
NFSHF ࣗ ૬ख ࣗͷมߋʹ૬ख ͷมߋΛ͔ͿͤΔ Πϝʔδ
SFCBTF ࣗ ૬ख
SFCBTF Πϝʔδ ࣗ ૬ख
SFCBTF Πϝʔδ ࣗ ૬ख
SFCBTF Πϝʔδߏஙͷ༷ࢠ ࣗ ૬ख ΠϚίί
SFCBTF Πϝʔδߏஙͷ༷ࢠ ࣗ ૬ख ΠϚίί
SFCBTF Πϝʔδߏஙͷ༷ࢠ ࣗ ૬ख ΠϚίί
SFCBTF Πϝʔδߏஙͷ༷ࢠ ࣗ ૬ख ΠϚίί
SFCBTF Πϝʔδߏஙͷ༷ࢠ ࣗ ૬ख ΠϚίί
SFCBTF Πϝʔδߏஙͷ༷ࢠ ࣗ ૬ख
SFNPUFϒϥϯν໊Λলུ͠ͳ͍
ૢ࡞໌ࣔతʹ HJUQVTIPSJHJOGFBUVSFYYY
ͻͱ͔ͭܽͤ·ͤΜ HJUTUBUVT HJUEJGG HJUBEE HJUEJGGDBDIFE HJUDPNNJU HJUQVTIPSJHJOGFBUVSFYYY
มߋͪ͠ΌμϝͳιϨ
ެ։ࡁΈͷ ྺ࢙Λ มߋͯ͠ ͍͚ͳ͍
SFCBTF SFCBTFͱ ྺ࢙Λ࠶ߏங͢Δ͜ͱ
ެ։ࡁΈͱ جຊతʹ HJUQVTI ͨ͠ͷ ͞Εͨͷ
ͦΕ͕Θ͔ͬͯͳ͍ͱ ଞਓ͕QVTIͨ͠ͷΛ DMPOF DIFDLPVU ͖ͯͯ͠ Կ͔͠ΒͷλΠϛϯάͰ HJUQVMMSFCBTF /(
·ͨ ͕ࣗQVTIͨ͠ͷ ଞͷਓ͕DIFDLPVUͯ͠Δͷʹ HJUSFCBTF HJUQVTIPSJHJOGGFBUVSFYYYY
SFCBTFͲΜͲΜͯ͠ྑ͍͚Ͳ ศར͔ͩΒͶ commit ͷཻΛͶ ៉ྷʹͨ͠ΓͶ ͨͩ͠ɺଞͷਓͷ͜ͱΛߟ͑Δ ͜ͷ rebase ͷҙຯΛߟ͑Δ
͍࡞ۀখϚϝʹSFCBTF
DPOqJDUখ͍͞΄͏͕ྑ͍ ϝΠϯͱͳΔ։ൃϒϥϯν ʑ rebase ͔͚·͠ΐ͏ Ϳ͔ͭΔͳΒখ͍͞͏ͪʹʂ
͖ͨͩͬ͠͞ͷ ଞਓ͕QVTIͨ͠ͷΛ DMPOF DIFDLPVU ͖ͯͯ͠ Կ͔͠ΒͷλΠϛϯάͰ HJUQVMMSFCBTF /(
·ͨ merge ...
(JU)VCͱ1VMM3FRVFTU͏
Git Λಋೖ͢Δ͜ͱ ʺϞμϯͰΠέͯΔ։ൃ
Git ͷಋೖ ͱ ։ൃϑϩʔɾۀϑϩʔͷ ࠶ߏஙͦͷͷ
(JUͬͯΔͷʹ ϒϥϯνͭͱ͔
(JU)VC͕ͦ͜ (JUΛͬͨ։ൃʹ͓ ͚Δ࠷ྑͷπʔϧͰ ͋Δʂ ଟ
࣌(*5-"#ͬͯ·͚ͨ͠ͲͶฐࣾ όʔδϣϯ͕͋Γ·ͬͯ͘·͢Ͷ ΊͯΑ͔ͬͨ
1VMM3FRVFTU ʮPull Requestʯ Φʔϓϯιʔ εʹݶΒͣ͑Δ༏Εͨ։ൃϑ ϩʔͩ http://d.hatena.ne.jp/sotarok/20120219/1329581585
1VMM3FRVFTU Ͱ͖Δ͚ͩ୯ҐΛখ͘͞
1VMM3FRVFTU େ͖͘ͳΓ͗͢Δ߹ τϐοΫϒϥϯν͔Β αϒτϐοΫͰϒϥϯνΛΔ
࠷ۙ͋ͬͨେن։ൃ αϒτϐοΫϒϥϯν 33 branch merges 165 commits
࠷ޙʹͦͷଞͷ
1VMM3FRVFTUຖͷ࣮ߦڥ Production = marketing.crocos.jp Pull Request #123 = pr123.dev.marketing.crocos.jp
1VMM3FRVFTUຖͷ࣮ߦڥ nginxͰ ... server_name ~^pr([^.]+).dev.([^.]+) ɹɹɹɹ\.marketing\.crocos\.jp$; set $pr_name $1; set
$app_name $2;
(JU'MPXY(JU)VC'MPX @ship @battleship
ଟࢀߟʹͳΔࢿྉ
ා͘ͳ͍(JU IUUQLPUBTIBUFOBCMPHKQFOUSZ (JU#PPL IUUQHJUTDNDPNCPPLKB
-FBSOJOH(JU#SBODIJOH IUUQLTXEDDMFBSO(JU#SBODIJOHKB "TVDDFTTGVM(JUCSBODIJOHNPEFMΛ ༁͠·ͨ͠ IUUQLFJKJOTPOZBCBOCMPHTQPUKQ TVDDFTTGVMHJUCSBODIJOHNPEFMIUNM
(JUΛऔΓר͘ڥɺ ։ൃϑϩʔͷ ૬ஊ૭ޱΛઃ͚·ͨ͠
SFDSVJU!DSPDPTDPKQ
None