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
1
30
ソフトウェア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.5k
Wiki についての今昔物語 / Crowi
sotarok
5
14k
Other Decks in Technology
See All in Technology
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
120
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
260
Amazon VPC Lattice 最新アップデート紹介 - PrivateLink も似たようなアップデートあったけど違いとは
bigmuramura
0
190
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
470
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
110
Postman と API セキュリティ / Postman and API Security
yokawasa
0
200
レンジャーシステムズ | 会社紹介(採用ピッチ)
rssytems
0
150
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
180
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
180
PHPからGoへのマイグレーション for DMMアフィリエイト
yabakokobayashi
1
170
生成AIのガバナンスの全体像と現実解
fnifni
1
190
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
330
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
What's in a price? How to price your products and services
michaelherold
243
12k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Git: the NoSQL Database
bkeepers
PRO
427
64k
A better future with KSS
kneath
238
17k
Designing for humans not robots
tammielis
250
25k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Music & Morning Musume
bryan
46
6.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