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.1k
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
【shownet.conf_】革新と伝統を融合したファシリティ
shownet
PRO
0
310
AWSへのNIST SP800-171管理策 導入に向けての整備/20240930 Mitsutoshi Matsuo
shift_evolve
0
200
[JAWS-UG GameTech] 第6回 各種事例紹介_18TRIPにおけるAWSサービスを活用した負荷テスト・障害テスト
naoto_yasuda
0
150
Azure Verified Moduleを触って分かった注目ポイント/azure-verified-module-begin
mhrtech
1
350
テストコードの品質を客観的な数値で担保しよう〜Mutation Testのすすめ〜
ysknsid25
11
3.1k
【shownet.conf_】クロージングセッション
shownet
PRO
0
290
コード✕AIーソフトウェア開発者のための生成AI実践入門~
yuhattor
3
710
How CERN serves 1EB of data via FUSE
ennael
PRO
0
16k
OPENLOGI Company Profile
hr01
0
54k
I tried the newly introduced certification "Applied Skills" on Microsoft Learn
mappie_kochi
0
130
エムスリーマネジメントチーム紹介資料 / Introduction of M3 Management Team
m3_engineering
0
270
Assisted reorganization of data structures
ennael
PRO
0
250
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
7
280
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Docker and Python
trallard
40
3k
Side Projects
sachag
452
42k
Facilitating Awesome Meetings
lara
49
6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
46
4.9k
No one is an island. Learnings from fostering a developers community.
thoeni
19
2.9k
What's new in Ruby 2.0
geeforr
341
31k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
32k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
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