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
チーム開発 @ GitHub
Search
ayatk
December 02, 2017
Programming
2
540
チーム開発 @ GitHub
2017/12/01に行ったプロジェクト内でのGitHub講習会で使った資料
一部privateリポジトリもありますがなくても多分大丈夫です
ayatk
December 02, 2017
Tweet
Share
More Decks by ayatk
See All by ayatk
お金🤑をかけずにフィードバックフォームを構築しちゃう💪お話
ayatk
2
1.2k
Android開発における自動化のすゝめ
ayatk
5
900
Other Decks in Programming
See All in Programming
バグを見つけた?それAppleに直してもらおう!
uetyo
0
190
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
2
130
Spatial Rendering for Apple Vision Pro
warrenm
0
180
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
360
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
320
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
660
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
4
860
php-conference-japan-2024
tasuku43
0
370
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
390
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
130
命名をリントする
chiroruxx
1
460
CloudflareStack でRAGに入門
asahiiwm
0
130
Featured
See All Featured
The Invisible Side of Design
smashingmag
298
50k
Building Your Own Lightsaber
phodgson
103
6.1k
Typedesign – Prime Four
hannesfritz
40
2.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Fireside Chat
paigeccino
34
3.1k
How GitHub (no longer) Works
holman
311
140k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
KATA
mclloyd
29
14k
Transcript
νʔϜ։ൃ @ GitHub 2017/12/01 @ayatk
͡ΊΔલʹ……
Git ษڧ͖ͯ͠·͔ͨ͠?
ࠓGitͷجຊతͳ͜ͱ͕Θ ͔͍ͬͯΔલఏͰ͓͠·͢
͋ͱɺશ෦Ζ͏ͱ͢Δͱେ ʹͳͬͨͷͰɺνʔϜ։ൃʹ࠷ ݶඞཁͳͷΛઆ໌͠·͢
ࠓΔ͜ͱ • GitHubΛͬͨνʔϜ։ൃ • ͱΓ͋͑ͣGitΛͬͯΈΔ • READMEͷॻ͖ํ • gitignore
ࠓΔ͜ͱ • GitHubΛͬͨνʔϜ։ൃ • ͱΓ͋͑ͣGitΛͬͯΈΔ • READMEͷॻ͖ํ • gitignore
GitHubΛͬͨνʔϜ։ൃ • νʔϜ։ൃͰඞཁʹͳΔGitHubͷػೳ • Issue • Pull Request • ϒϥϯν
͜ͷϖʔδΛݟͳ͕ΒΓ·͢ https://github.com/kiesproject/prepass-ios
GitHubΛͬͨνʔϜ։ൃ • νʔϜ։ൃͰඞཁʹͳΔػೳ • Issue • Pull Request • ϒϥϯν
GitHub Issue • GitHubʹ͋ΔϓϩδΣΫτͷ՝όάͳͲ Λཧ͢ΔͨΊͷνέοτཧػೳ • ࣭ೖΕ͍ͨػೳͷఏҊͳͲϓϩδΣΫτ ʹؔ͢Δͯ͢ͷ͜ͱΛͨΊ͓ͯ͘ॴ
Issueʹॻ͘͜ͱ • ͺͬͱ಄ʹු͔Μͩ͜ͱͰશવॻ͍͍͍ͯɺ ͱݴ͏͔ॻ͍ͯ • ʮ͜ͷػೳཉ͍͠ʯͱ͔ʮ͜ͷػೳ͍Βͳ ͍ͷͰʯͱ͔ͳΜͰ͍͍
IssueΛॻ͘ͱ͖ʹؾʹͯ͠΄͍͜͠ͱ • λΠτϧͷΈ͚ͩͰத͕Θ͔ΔΑ͏ʹ • Ͱ͖Δ͚ͩ۩ମతʹॻ͘ • ࣗΘ͔ͬͯΔ͚Ͳ૬ख͕Θ͔Βͳ͍ͱҙຯ ͳ͍ • όάใࠂࣗͷڥͱ࠶ݱঢ়گΛৄ͘͠ॻ͘
• खॱΛলུ͠ͳ͍
Issue͕ଟ͘ͳͬͯ͘Δͱग़ͯ͘Δ • ͲͷIssue͕όάͰͲΕ͕ػೳՃͳͷ͔Θ͔ Βͳ͘ͳͬͯ͘Δ • తͷIssueΛૉૣ͘ݟ͚ͭΕͳ͍ • ͨ͘͞ΜͷIssue͔Β୳͢࡞ۀ • ͭΒ͍
LabelΛ͓͏? • IssueʹͦΕͧΕLabel͕͚ͭΕΔ • LabelΛ͚ͭΔͱLabelΛΫϦοΫ͢Δ͚ͩͰ ϑΟϧλϦϯά͕Ͱ͖Δ • IssueΛݟ͚ͭΔͷָ͕ʹͳΔ
LabelͬͯͲΜͳײ͡? • ੨৭ͷenhancement͕ػೳՃ • ͷbug͕όάใࠂ • ΄͔ʹࣗͰLabelΛ࡞ΕΔ
LabelͰϑΟϧλϦϯά • enhancementͰϑΟϧλϦϯάͨ͠ͷ • ͖ͬ͞ݟ͍͑ͯͨbugͷLabelফ͑Δ
DEMO
GitHubΛͬͨνʔϜ։ൃ • νʔϜ։ൃͰඞཁʹͳΔػೳ • Issue • Pull Request • ϒϥϯν
Pull Request (PR) • ͋ΔϒϥϯνͰ࡞ۀͨ͠ͷΛผͷϒϥϯν ʹϚʔδͯ͠΄͍͠ͱ͍͏ཁΛͩ͢ • ͜͜ͰίʔυͷϨϏϡʔॿݴΛͯ͠Β͏ • PR͕OKͩͬͨΒPRΛૹͬͨਓҎ֎ͷਓ͕
ϚʔδΛߦ͏
Pull Request (PR) • PR͕Ϛʔδ͞ΕͨΒϚʔδݩͷϒϥϯνجຊతʹফ͢ • ͍Βͳ͍ϒϥϯν͕ཚཱͯ͠ҧ͏ϒϥϯνʹίϛο τͯ͠͠·͏͜ͱ͕૿͑Δ • PRΛϚʔδ͢Δͱ”Delete
branch”ͱ͍͏Ϙλϯ͕ දࣔ͞ΕΔͷͰͦΕΛԡ͢ • ͠ίϯϑϦΫτͯ͠GitHubͷWeb্Ͱमਖ਼Ͱ͖Δ
Pull Requestʹॻ͘͜ͱ • λΠτϧ • ͳΜͷͨΊʹ͜ͷPRΛग़ͨ͠ͷ͔ • ʮ̋̋ͷͱ͖ʹ̋̋͢ΔΛमਖ਼ʯɺʮ̋̋ͷػೳΛՃʯ • આ໌
• ۩ମతͳमਖ਼༰ • λΠτϧ͚ͩͰݴ͑ͳ͔ͬͨิઆ໌ • εΫϦʔϯγϣοτ • ؔ࿈͢ΔIssue • ࣮ͯͯ͠Θ͔Βͳ͔ͬͨͱ͜
Pull Requestͷྫ
૬ख͕ཧղͰ͖ΔͳΒOK
ϝϯόʔʹΑΔίʔυϨϏϡʔ • Pull Request͕͛ΒΕΔͱଞͷϝϯόʔʮίʔυϨ ϏϡʔʯΛߦ͏ • ίʔυϨϏϡʔιϑτΣΞΛεϜʔζʹ։ൃ͢Δ্ Ͱඞཁ • ٕज़తෛ࠴
(ͦͷݴޠͰྑ͘ͳ͍ͱ͞ΕΔॻ͖ํࡶͳίʔ υϑΥʔϚοτ)
ϨϏϡʔΛ͢Δ • ԿΛݟΕ͍͍ͷ͔ • ࣮ࡍʹಈ͘ͷ͔(ಈ͔ͳ͔ͬͨΒݩࢠ ͳ͍) • ίʔυͷنʹԊ͍ͬͯͳ͍ͱ͜Ζ
ϨϏϡʔͷ݁ՌΛ૬खʹ͑Δ • ଟνʔϜ։ൃͰҰ൪Ή͔͍ͣ͠ • ݴ༿ݣ͍ʹؾΛ͚ͭΔ͜ͱ • ର໘Ͱແ͍ɺड͚औΔײ͕ҟͳΔ߹͕ ͋Δ • ڧ͍ݴ༿Λ͍ଓ͚ͯΔͱνʔϜͷ่յΛট͘
ϨϏϡʔͰઈର͍͚ͬͯͳ͍͜ͱ • ਓ֨߈ܸ • ݟΔͷίʔυͰ͋ͬͯਓ͡Όͳ͍ • ѱ͍ݴ༿͍(໋ྩޱௐ) • LINEͰ͍͖ͳΓڧ͍ͨΓํ͞ΕͨΒͭ Β͍ΑͶ?
ϨϏϡʔͷ݁ՌΛ૬खʹ͑Δ • ͡Ό͋Ͳ͏͢Ε͍͍? • ੵۃతʹίϝϯτͯ͋͛͠Δ • ྑ͍߹͍͍͜ͱΛݴͬͯѱ͍߹ͩΊͬ ͯͪΌΜͱݴ͏ • ֆจࣈΛଟΊʹ͍·͠ΐ͏
• ֆจࣈΛ͏͚ͩͰ͍ͩͿงғؾ͕มΘΓ· ͢
࣮ࡍͷϨϏϡʔ෩ܠ • ΊͬͪΌྑ͔ͬͨͷͰ͍͍ͶΛ͠·ͬͨ͘ • ͜ΕΛΔ͚ͩͰPRΛૹͬͨਓ͍҆͢͝৺͢Δ
ϨϏϡʔΕΔ΄Ͳ ͓ޓ͍ʹ͠·͢
ͲΜͲΜΖ͏
GitHubΛͬͨνʔϜ։ൃ • νʔϜ։ൃͰඞཁʹͳΔػೳ • Issue • Pull Request • ϒϥϯν
νʔϜ։ൃͰͷϒϥϯνӡ༻ • νʔϜ։ൃͰෳਓ͕ಉ࣌ʹಉ͡ίʔυΛ͍ ͡ΔͨΊɺ͖ͪΜͱͨ͠ϒϥϯνͷӡ༻͕ඞཁ • ϝϯόʔશһ͕masterϒϥϯνͰ࡞ۀ͢Δͱ pushͰ͖ͳ͍͠ɺπϦʔͷ߹ੑ͕औΕͳ ͘ͳͬͯࠈ of ࠈ
ϒϥϯνͷӡ༻ମܥ • Git Flow • GitHub Flow • GitLab Flow
• ଞʹͨͿΜ͍ͬͺ͍͋Δ
ϒϥϯνͷӡ༻ମܥ • Git Flow • GitHub Flow • GitLab Flow
• ଞʹͨͿΜ͍ͬͺ͍͋Δ
Git Flow • Vincent Driessenࢯ͕ఏএ͢ΔϒϥϯνϞσϧ • ΞϓϦπʔϧͳͲόʔδϣϯΛ͍ͬͯͯɺݹ ͍όʔδϣϯαϙʔτ͢ΔΑ͏ͳϦϦʔεϞσ ϧͰΑ͘ΘΕΔ •
େنͳϓϩδΣΫτͰ͋Δ΄ͲޮՌΛൃش͢Δ • ӡ༻ํ๏͕ෳࡶͰॳΊͯͷਓʹΘ͔Γʹ͍͘
Git Flow • masterϒϥϯνͱ developϒϥϯνΛ ϕʔεͱͯ͠։ൃ • ։ൃΛߦ͏ͷ developϒϥϯνͱ ͔ͦ͜Βੜ͢Δ
ϒϥϯνͷΈ http://nvie.com/posts/a-successful-git-branching-model/
Git Flow • developϒϥϯν͔Β featureϒϥϯνΛੜͤ Δ • featureϒϥϯνͰ৽ػೳ ΛՃ͍ͯ͘͠ •
Ճ͠ऴ͑ͨΒdevelop ϒϥϯνʹPullRequestΛ ͛Δ http://nvie.com/posts/a-successful-git-branching-model/
Git Flow • ϦϦʔε͕Ͱ͖Δঢ়ଶʹͳͬ ͨΒdevelopϒϥϯν͔Β releaseϒϥϯνΛ࡞ΓϦϦʔ ε࡞ۀΛߦ͏ • ϦϦʔε࡞ۀ͕ऴΘͬͨΒ masterϒϥϯνͱdevelopϒ
ϥϯνʹϚʔδ • Ϛʔδͨ͠masterϒϥϯνʹ όʔδϣϯ໊Λ͚ͭͨtagΛ Δ http://nvie.com/posts/a-successful-git-branching-model/
Git Flow • ͍όά͕͋ͬͯࠓ ͙͢मਖ਼͠ͳ͍ͱࢮ ͵ͬͯͱ͖ɺ masterϒϥϯν͔Β hotfixϒϥϯνΛ࡞Δ • मਖ਼͕ऴΘͬͨΒ
developͱmasterʹ Ϛʔδͯ͠λάΛΔ http://nvie.com/posts/a-successful-git-branching-model/
ਖ਼͠ΜͲ͍
GitHub Flow • GitHub͕ࣾఏএ͢ΔϒϥϯνϞσϧ • masterϒϥϯνʹfeatureϒϥϯνੜͯ͠Ϛʔδ͢Δ͚ͩ ͷϞσϧ • WebαʔϏεͱ͔͖ͬΓͨ͠ৗʹϦϦʔεͩͥˑΈ͍ͨ ͳϦϦʔεϞσϧΛ࠾༻ͯ͠ΔͳΒઈରͬͪ͜
• Git Flow͚ͬͨͲͭΒ͍…͎ŵŧƄແཧɻɻͬͯͳͬͨΒ ͬͪ͜
http://shoma2da.hatenablog.com/entry/2015/11/04/233534
ΊͬͪΌγϯϓϧ
GitHub Flow • GitHub Flowͷ੍ • masterʹ͋ΔͷͳΜͰσϓϩΠՄೳ(ͪΌΜͱಈ͔ͳ͖Ό͍͚ͳ͍) • master͔ΒfeatureΛੜ͢ͱ໊͖લΛઆ໌తͳͷʹ͢Δ͜ͱ(new- oauth2-scopesͱ͔)
• masterʹϚʔδͰ͖Δͱײͨ͡ΓɺԿ͔ॿݴ͕ཉ͔ͬͨ͠Βmasterʹ͚ͯ PullRequestΛ͛Δ(·ͩϚʔδͰ͖ͳ͍ͱ͖[WIP]ͱ͚ͭΔͱΘ͔Γ ͯ͘͢Α͍) • ϚʔδΛͨ͠Βͦͷϒϥϯν͙͢ফ͠ɺ࠶ར༻͠ͳ͍
GitHub Flow • masterʹ͋ΔͷͳΜͰσϓϩΠՄೳ(ͪΌΜͱಈ͔ͳ͖Ό͍͚ͳ͍) • master͔ΒfeatureΛੜ͢ͱ͖ӳޠͷ໊લͰઆ໌తͳͷʹ͢Δ͜ͱ (new-oauth2-scopesͱ͔) • ܾͯࣗ͠ͷ໊લͷϒϥϯνΛ࡞Βͳ͍ •
͜ͷ2ͭͷ੍ʹؔͯ͠ͲΜͳϒϥϯνϞσϧΛͬͯඞͣकΔ͜ͱ! (कΒͳ͍ͱ୭͕ԿΛ͍ͬͯΔͷ͔Θ͔Βͳ͘ͳͬͨΓͯ͠ɺ νʔϜ։ൃ͕͘͠ͳΔ)
࣮ࡍ։ൃͯͯ͠Ͳ͏ͳͷ • AndroidΞϓϦ͔͠Θ͔Βͳ͍͚ͲɺGit Flow Λগ͔͠ΜͨΜʹͨ͠ϒϥϯνϞσϧΛͬ ͯ։ൃ͢ΔͱίϯϑϦΫτ͢Δස͕ݮͬͯ ྑ͍ • PullRequestͳͲͰϨϏϡʔ͠߹͏͜ͱͰ໌Β ͔ʹ͓͔͍͠ॻ͖ํ͕ݮΔ
࣮ࡍ։ൃͯͯ͠Ͳ͏ͳͷ • ؾ͍ͮͨͱ͖ʹIssueΛॻ͍͍ͯ͘͜ͱͰ࣍ʹ Βͳ͚Ε͍͚ͳ͍͜ͱ͕͖ͬΓ͢Δ • Issueͩͱ͔PRͩͱ͔श׳͚ͮΛ͠ͳ͍ͱ͠ ΜͲ͘ͳͬͯ͘Δ
։ൃͷͨΊͷश׳͚ͮ • ΞϓϦ൝ͷͱ͋ΔνʔϜͰ… • શһ͕ू·ΔͰ͋Ζ͏׆ಈʹɺͦͷʹ͍ ΔશһͰIssueΛݟ͠ɺ༏ઌΛܾΊ͍ͯ͘ • ࠓिඞͣΔͷΛϐοΫΞοϓ࣮ͯ͠ • ͱ͍͏͜ͱΛຖिඞ͍ͣͬͯΔ
ࠓΔ͜ͱ • GitHubΛͬͨνʔϜ։ൃ • ͱΓ͋͑ͣGitΛͬͯΈΔ • READMEͷॻ͖ํ • gitignore
Git࣮ࡍʹखΛಈ͔͞ͳ͍ͱ શ͘ʹ͖ͭ·ͤΜ
ͳͷͰGitͰใΛ ॻ͖·͠ΐ͏
ใͷϦϙδτϦ • ֤νʔϜ͝ͱʹใΛॻ͘ϦϙδτϦΛ͚ ͍ͯ·͢ • ΞϓϦ൝ -> app.docs • ϋʔυΣΞ൝
-> hardware.docs • VR൝ -> vr.docs
ใͷϦϙδτϦ • ͳΜͰ xxx.docsͱ͍͏໊લʹ͍ͯ͠Δͷ? • KIESϓϩδΣΫτਓ͕ଟ͗͢ΔͷͰ͚ͨ • ͜͜ʹ֤൝ͷυΩϡϝϯτҰॹʹཧͯ͠΄ ͍͔͠Β •
GitͱPRͷ࿅शͱࢥ͍͚ͬͯͨͩΕ
ใͷॻ͖ํ • ݸਓͷใ֤൝ͷϦϙδτϦͷmaster͔Β ࣗͷ໊લ(খจࣈӳࣈ)ͷϒϥϯνΛͬͯॻ ͍ͯΒ͍·͢ • ςϯϓϨʔτ͕͋ΔͷͰͦΕΛίϐʔͯ͠ progress-2017/12/01.mdΈ͍ͨͳϑΝΠϧ໊ Ͱอଘͯ͠ॻ͍͍ͯͩ͘͞
ใͷॻ͖ํ • Markdownͱ͍͏ه๏ͰใΛॻ͖·͢ • Markdownͷॻ͖ํʮMarkdown ॻ͖ํʯ ͰάάΕग़ͯ͘ΔͷͰ͙͙͍ͬͯͩ͘͞ • λΠτϧʮ<:2017/11/30>::ใ::<໊લ >ʯΈ͍ͨͳײ͡Ͱॻ͍͍ͯͩ͘͞
masterʹஔ͘ͷ • masterʹ֤൝ͷυΩϡϝϯτΛ͓͍ͯΒ͍·͢ • खॱॻͱ͔Tipsͱ͔ • Ͱ͖ΕPowerPointͱ͔Wordͱ͔Ͱॻ͔ͳ͍Ͱ MarkdownͰॻ͍ͯ΄͍͠Ͱ͢ • PowerPointͱ͔WordͩͱWeb্ͰݟΕͳ͍
• υΩϡϝϯτPRͰͷΈՃ͢ΔΑ͏ʹ͍ͯͩ͘͠͞
ৄ֤͘͠ϦϙδτϦͷ READMEΛݟͯͶ
ࠓΔ͜ͱ • GitHubΛͬͨνʔϜ։ൃ • ͱΓ͋͑ͣGitΛͬͯΈΔ • READMEͷॻ͖ํ • gitignore
README • ϝϯόʔ͕ͦͷϓϩδΣΫτʹೖͬͨͱ͖ʹ࠷ॳʹݟΔυΩϡ ϝϯτ • ϓϩδΣΫτʹ͍ͭͯͷඞཁ࠷ݶͷใΛॻ͘ • ͜ΕΛॻ͘ͱϝϯόʔ͕READMEΛಡΉ͚ͩͰϓϩ δΣΫτʹ͍ͭͯΘ͔Δ •
ϓϩδΣΫτʹ͍ͭͯͷ༷ॻ • νʔϜ։ൃΛ͢Δ্Ͱίʔυͱಉ͙͡Β͍େ
READMEʹԿΛॻ͘ͷ͔ 1. ϓϩδΣΫτͷ໊લ 2. ԿΛ͢ΔͨΊϓϩδΣΫτͰ͜ΕΛ͏ͱԿ͕Ͱ͖Δͷ͔ 3. ϓϩδΣΫτͷ͍ํͱΠϯετʔϧํ๏ 4. ϓϩδΣΫτͷ։ൃΛ͢Δ্ͰඞཁͳϥΠϒϥϦͩͬͨΓ πʔϧҰཡͱɺΠϯετʔϧํ๏
5. πʔϧͰ͋ΕαϯϓϧίʔυͳΜ͔ΛࡌͤΔ
αϯϓϧͷREADME https://github.com/kiesproject/MawaRoute
ࠓΔ͜ͱ • GitHubΛͬͨνʔϜ։ൃ • ͱΓ͋͑ͣGitΛͬͯΈΔ • READMEͷॻ͖ํ • gitignore
gitignoreͱͳΜͧ • gitͰཧͨ͘͠ͳ͍ϑΝΠϧΛআ֎͢ΔͨΊͷ Έ • CݴޠͩͬͨΒίϯύΠϧͨ͋͠ͱͷΦϒδΣ ΫτϑΝΠϧͩͬͨΓ࣮ߦϑΝΠϧ • ΤσΟλIDEͷconfigϑΝΠϧͩͬͨΓ •
ϓϩδΣΫτʹΰϛΛೖΕͳ͍ͨΊʹඞཁ
gitignoreͷछྨ • Global gitignore • Local gitignore
Global gitignore • ͯ͢ͷgitϦϙδτϦʹద༻͞ΕΔgitignore • OSͷΩϟογϡϑΝΠϧ(.DS_Storeͱ͔ thumbs.db)ΤσΟλͷઃఆϑΝΠϧͱ͔Λ ઃఆ͢Δ
Local gitignore • ϦϙδτϦ͝ͱʹద༻͞ΕΔgitignore • ༻͍ͯ͠ΔݴޠͷઃఆͩͬͨΓɺϦϙδτϦͩ ͚ͰGitཧ֎ʹ͍ͨ͠σΟϨΫτϦΛઃఆ͢Δ • OSͷϑΝΠϧIDEͷઃఆͱ͔ઈରೖΕͳ͍! (શһ͕ಉ͡OSɺIDEΤσΟλΛͬͯΔͱݶ
Βͳ͍)
gitignoreͷॻ͖ํ • σΟϨΫτϦ • <σΟϨΫτϦ໊> / • ϫΠϧυΧʔυ • *
(ΞελϦεΫ) ͰύλʔϯʹϚον͢Δͯ͢ͷϑΝΠϧ͕ আ֎͞ΕΔ • ֦ுࢠ • *.py, *.java
gitignoreͷॻ͖ํ • আ֎ͷআ֎ • ߦͷઌ಄ʹʮ!ʯΛ͚ͭΔ͜ͱͰGitཧͷআ֎͔Βআ֎͢Δ͜ͱ͕Մೳ • ྫ͑ɺbuildσΟϨΫτϦΛGitཧ͔Βআ֎͍͕ͨ͠ɺதʹ͋Δi- need.txtͱ͍͏ϑΝΠϧ͚ͩͲ͏ͯ͠GitͰཧ͍ͨ͠ͱ͖ • build/
!build/i-need.txt • ίϝϯτ • ʮ#ʯΛߦͷઌ಄ʹ͚ͭΕͦͷߦίϝϯτͱͯ͠ॲཧ͞ΕΔ
࣮ࡍʹॻ͘ͱ͜Μͳײ͡ # Windows thumbnail cache files Thumbs.db ehthumbs.db ehthumbs_vista.db #
Dump file *.stackdump # Folder config file [Dd]esktop.ini # Recycle Bin used on file shares $RECYCLE.BIN/ # Windows Installer files *.cab *.msi
Global gitignoreͷஔ͖ॴ • جຊతʹUser HomeσΟϨΫτϦʹஔ͘ • Windows • %USERPROFILE%\.gitignore_global •
macOS • $HOME/.gitignore_global
Local gitignoreͷஔ͖ॴ • ϓϩδΣΫτͷRootσΟϨΫτϦʹஔ͘ • ϑΝΠϧ “.gitignore” Ͱͳ͍ͱGitʹೝࣝ ͞Εͳ͍ •
ࢠͷσΟϨΫτϦʹஔ͍ͯେৎ
Global gitignoreద༻ํ๏ • ίϚϯυ (ָͩ͠Φεεϝ) • git config --global core.excludesfile
<.gitignore_globalͷpath> • ϑΝΠϧΛ͍͡Δ • User HomeσΟϨΫτϦʹ “.gitconfig”ͱ͍͏ϑΝΠϧ͕͋Δ ͷͰͦͷதʹҎԼͷΑ͏ʹॻ͚OK • [core] excludesfile = path/to/gitignore_global
͜͜Λݟͳ͕Βઃఆ͢Δͱ͍͍ https://github.com/github/gitignore