Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
git subtree 替代 git submodule
cloudsben
July 24, 2013
Programming
14
3.2k
git subtree 替代 git submodule
git subtree 替代 git submodule
cloudsben
July 24, 2013
Tweet
Share
Other Decks in Programming
See All in Programming
未経験QAの私が、よきQA(Question Asker) になっていく物語
atamaplus
0
380
mrubyを1300円のボードで動かそう
yuuu
0
190
Better Reliability through Observability (and Experimentation)
ksatirli
PRO
1
380
Kotlin 最新動向2022 #tfcon #techfeed
ntaro
1
1.2k
偏見と妄想で語るスクリプト言語としての Swift / Swift as a Scripting Language
lovee
2
310
SRE NEXT 2022: Sensible Incident Management for Software Startups
takanabe
2
880
デュアルトラックアジャイル× Agile Testingから 見えてきたQAのミライ
atamaplus
0
500
Licences open source : entre guerre de clochers et radicalité
pylapp
2
380
CIでAndroidUIテストの様子を録画してみた
mkeeda
0
190
Named Document って何?
harunakano
0
610
Swift Concurrencyによる安全で快適な非同期処理
tattn
2
340
脱オブジェクト指向講座(5分LT資料)
kishida
8
11k
Featured
See All Featured
How to Ace a Technical Interview
jacobian
265
21k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
19
1.4k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_i
21
15k
Fireside Chat
paigeccino
11
1.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
7
1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
4
450
Embracing the Ebb and Flow
colly
73
3.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
316
22k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
498
130k
Six Lessons from altMBA
skipperchong
14
1.3k
Designing for humans not robots
tammielis
241
23k
Clear Off the Table
cherdarchuk
79
280k
Transcript
git subtree ڗ -@cloudsben
git submodule Ҹ许ଖଞత仓库ࢦఆҰcommitቕೖ仓库తࢠ录
git subtree ସgit submodule ໋ྩ, ߹ኂࢠ仓库౸项தኂ์ࡏࢠ录
为ॄ㜮ཁ༻git subtree • ཧߋ৽ྲྀఔൺ较ํศ • git v1.5.2Ҏݐ议༻git subtree (git v1.7.11
࠽߹ኂ进དྷ) • 仓库 cloneԼདྷෆधཁ init update • ෆձ产ੜ૾ .gitmodule 㜎ࣅతจ݅ • git submodule 删আىདྷൺ较费劲 • 㠥֎还༗Ұࠣ团队协࡞时త尴䭾问题
༻ git subtree ձ۰౸ॄ㜮 • 㟬ಘֶձgit subtree৽త߹ኂํ໋ࣜྩ • 给ࢠ仓库贡ݙ码༗ൟ琐
Կ༻git subtree • git subtree -h • 䈀简ํࣜ • ී௨ํࣜ
• ೋṧํࣜ
䈀简ํࣜ • ఴՃࢠ仓库 git subtree add --prefix=lib 仓库 ᅿ ࢧ
--squash • ߋ৽ git subtree pull --prefix=lib 仓库ᅿ ࢧ --squash • 这䝅ํࣜ㭕༻༩༻ଖଞ仓库码,ෆpush 码ํࣜ ,ୠੋ᠍बੋ໋ྩ༗⻓长
ී௨ํࣜ • ఴՃ远ఔࢧ git remote add -f ࢧ໊ ࢠ仓库 •
git subtree add --prefix=lib2 远ఔࢧ ࢧ --squash • ߋ৽仓库 git fetch 远ఔࢧ ࢧ , git subtree pull -- prefix=lib2 远ఔࢧ ࢧ --squash • push ౸ࢠ仓库码 git subtree push --prefix=lib2 sub2 master
ೋṧํࣜ • टઌղ释为ॄ㜮ੋೋṧํࣜ, ༗git subtree 为ॄ㜮ෆ༻ ? • ఴՃ远ఔࢧ git
remote add -f ࢧ໊ ࢠ仓库 • git merge -s ours --no-commit 远ఔࢧ/master (-s ours දࣔ fetch ଖଞ远ఔࢧ头৴ଉԼདྷ,ୠੋෆվ变લࢧঢ়态) • git read-tree --prefix=lib -u 远ఔࢧ/master • git commit -m '' • git pull -s subree 远ఔࢧ master
THANK YOU @cloudsben cloudsben.com