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
ソフトウェア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
20
9.7k
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
PHPでダイエット / Dietcube #phpblt
sotarok
2
4.3k
Other Decks in Technology
See All in Technology
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
190
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
9
1.1k
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
160
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
130
Taming you application's environments
salaboy
0
190
強いチームと開発生産性
onk
PRO
35
11k
いざ、BSC討伐の旅
nikinusu
2
780
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.5k
Lexical Analysis
shigashiyama
1
150
TypeScript、上達の瞬間
sadnessojisan
46
13k
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
Featured
See All Featured
What's new in Ruby 2.0
geeforr
343
31k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
4 Signs Your Business is Dying
shpigford
180
21k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
97
Adopting Sorbet at Scale
ufuk
73
9.1k
Building an army of robots
kneath
302
43k
A better future with KSS
kneath
238
17k
Into the Great Unknown - MozCon
thekraken
32
1.5k
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
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