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
State of Open Source Web Mapping Libraries
dayjournal
0
200
フロントエンド メタフレームワーク 選定の際に考えたこと
yuppeeng
0
590
エンジニアが一生困らない ドキュメント作成の基本
naohiro_nakata
2
140
信頼性に挑む中で拡張できる・得られる1人のスキルセットとは?
ken5scal
1
410
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
260
Redmine 6.0 新機能評価ガイド
vividtone
0
260
福岡新卒エンジニアの会
teba_eleven
1
190
Engineering at LY Corporation
lycorp_recruit_jp
0
320
徹底比較!HA Kubernetes ClusterにおけるControl Plane LoadBalancerの選択肢
logica0419
2
140
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
0
160
フルカイテン株式会社 採用資料
fullkaiten
0
40k
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
700
Why You Should Never Use an ORM
jnunemaker
PRO
54
9k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
The Cult of Friendly URLs
andyhume
78
6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Fireside Chat
paigeccino
33
3k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.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